Skip to content

trigger workflow using empty GitHub commit, close #2069 #2070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,15 @@ After making a [pull request](#pull-requests), the CLA assistant will add a revi
## Deployment

We will try to review and merge pull requests as fast as possible. After merging, we will deploy it to the staging environment, run E2E tests (using Cypress itself of course!), and then merge it into `master`, which will deploy it to the official [https://docs.cypress.io](https://docs.cypress.io) website. If you want to know our deploy process, read [DEPLOY.md](DEPLOY.md).

### Trigger workflow build

Due to CircleCI API limitations (even after 2 years), you cannot trigger a workflow build using the API. Thus if you need to build, test and deploy `develop` branch for example, your best bet is to create an empty GitHub commit in the [cypress-io/cypress-documentation](https://github.com/cypress-io/cypress-documentation) repository in the `develop` branch. We have added [make-empty-github-commit](https://github.com/bahmutov/make-empty-github-commit) as a dev dependency and set it as `make-empty-commit` NPM script in the [package.json](package.json).

To trigger production rebuild and redeploy, use personal GitHub token and run:

```shell
GITHUB_TOKEN=<your token> npm run make-empty-commit -- --message "trigger deploy" --branch master
```

As always, using [as-a](https://github.com/bahmutov/as-a) is recommended for storing and using sensitive environment variables.
150 changes: 129 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"dev": "start-test 2222 cypress:open",
"test-watch": "npm run test --silent -- --watch",
"test": "jest",
"warn-only": "stop-only --warn --folder cypress"
"warn-only": "stop-only --warn --folder cypress",
"make-empty-commit": "node node_modules/make-empty-github-commit/bin/empty.js --repo cypress-io/cypress-documentation"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -110,6 +111,7 @@
"jest": "24.8.0",
"keyv": "3.1.0",
"lint-staged": "8.2.1",
"make-empty-github-commit": "1.2.0",
"minimist": "1.2.0",
"nock": "10.0.6",
"ora": "3.4.0",
Expand Down