Skip to content

Commit

Permalink
docs: how to skip build step (#136)
Browse files Browse the repository at this point in the history
* docs: how to skip build step

Signed-off-by: Minsu Lee <amond@amond.net>
  • Loading branch information
amondnet authored Mar 11, 2022
1 parent 20b5c61 commit 3b14c34
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,39 @@ Set `github.enabled: false` in `vercel.json`, see example `vercel.json` file bel
"public": false,
"github": {
"enabled": false
},
}
}

```
When `github.enabled` set to `false`, `Vercel for GitHub` will not deploy the given project regardless of the GitHub app being installed.

### Skip vercel's build step

Since we do the `build` in `github actions`, we don't need to build in `vercel`.

#### Method 1 - via vercel interface

- Specify "Other" as the framework preset, and
- Enable the Override option for the Build Command, and
- Leave the Build Command **empty**.
- This will prevent the build from being attempted and serve your content as-is.

See [docs](https://vercel.com/docs/concepts/deployments/build-step#build-command) for more details

#### Method 2 - via `vercel.json`

If a Deployment defines the builds configuration property, the vercel's `Build & Development Settings` are ignored.

```json
{
"builds": [
{ "src": "./dist/**", "use": "@vercel/static-build" }
{ "src": "{{Source for distribution}}", "use": "@vercel/static" }
]
}

```
When set to false, `Vercel for GitHub` will not deploy the given project regardless of the GitHub app being installed.
Set `builds` to `@vercel/static` to skip vercel's build step. `src` is the path to the directory containing the files to be deployed.

Set `builds` to `@vercel/static-build` to use the static build instead of vercel's build commands. `src` is the path to the directory containing the files to be deployed.
See [docs](https://vercel.com/docs/cli#legacy/builds) for more details


### Project Linking
Expand Down
2 changes: 1 addition & 1 deletion example/static/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"enabled": false
},
"builds": [
{ "src": "./**", "use": "@vercel/static-build" }
{ "src": "./**", "use": "@vercel/static" }
]
}

4 comments on commit 3b14c34

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for team-scope-test ready!

✅ Preview
https://team-scope-test-onf29if1d-dietfriends.vercel.app

Built with commit 3b14c34.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for express-basic-auth ready!

✅ Preview
https://express-basic-auth-bi8afqymu-amond.vercel.app

Built with commit 3b14c34.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for zeit-now-deployment-action-example-static ready!

✅ Preview
https://zeit-now-deployment-action-example-static-i2fndh0g5-amond.vercel.app
https://master.static.vercel-action.amond.dev

Built with commit 3b14c34.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for zeit-now-deployment-action-example-angular ready!

✅ Preview
https://zeit-now-deployment-action-example-angular-877gqxmgc-amond.vercel.app

Built with commit 3b14c34.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.