doc(deploy): update action trigger guid

This commit is contained in:
artem.zaiko.ext 2022-04-27 18:11:45 +03:00
parent 606023c046
commit baa2f82d26

View file

@ -1,13 +1,18 @@
### Actions deploy guide ### Actions deploy guide
In order to trigger workflow action you should execute the following curl: In order to trigger workflow action you should execute the following curl ([docs](https://docs.github.com/en/rest/actions/workflows#create-a-workflow-dispatch-event)):
`curl -H "Accept: application/vnd.github.everest-preview+json" \` ```
`-H "Authorization: token <ACCESS_TOKEN>" \` curl \
`--request POST \` -X POST \
`--data '{"event_type": "<ACTION>"}' \` -H "Accept: application/vnd.github.v3+json" \
`https://api.github.com/repos/akveo/ngx-admin/dispatches` -H "Authorization: token <ACCESS_TOKEN>" \
https://api.github.com/repos/akveo/ngx-admin/actions/workflows/<WORKFLOW_ID>/dispatches \
-d '{"ref":"<REF>","inputs":{"name":"Mona the Octocat","home":"San Francisco, CA"}}'
```
This curl expects two input parameters: Parameters:
- `ACCESS_TOKEN`: A personal access token. Creating a [personal access token guide](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)
- `ACTION`: action to trigger ('deploy-docs', 'deploy-to-demo') - `WORKFLOW_ID` - the workflow id or its file name (e.g. `azureCliDeploy.yml`)
- `ACCESS_TOKEN`: A personal access token. Creating a [personal access token guide](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)
- `REF`: Required. The git reference for the workflow. The reference can be a branch or tag name. ('demo')