Skip to content

Commit 2fdd873

Browse files
azaiko-akveoartem.zaiko.ext
andauthored
feat(deploy): demo enable gh actions manual trigger (#5932)
* feat(deploy): enable manual triggering * fix(deploy): use the default azure/CLI version * doc(deploy): update action trigger guid * feat(deploy): enable manual triggering for docs Co-authored-by: artem.zaiko.ext <[email protected]>
1 parent 280fe4d commit 2fdd873

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
### Actions deploy guide
22

3-
In order to trigger workflow action you should execute the following curl:
3+
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)):
44

5-
`curl -H "Accept: application/vnd.github.everest-preview+json" \`
6-
`-H "Authorization: token <ACCESS_TOKEN>" \`
7-
`--request POST \`
8-
`--data '{"event_type": "<ACTION>"}' \`
9-
`https://api.github.com/repos/akveo/ngx-admin/dispatches`
5+
```
6+
curl \
7+
-X POST \
8+
-H "Accept: application/vnd.github.v3+json" \
9+
-H "Authorization: token <ACCESS_TOKEN>" \
10+
https://api.github.com/repos/akveo/ngx-admin/actions/workflows/<WORKFLOW_ID>/dispatches \
11+
-d '{"ref":"<REF>","inputs":{"name":"Mona the Octocat","home":"San Francisco, CA"}}'
12+
```
1013

11-
This curl expects two input parameters:
12-
- `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)
13-
- `ACTION`: action to trigger ('deploy-docs', 'deploy-to-demo')
14+
Parameters:
15+
16+
- `WORKFLOW_ID` - the workflow id or its file name (e.g. `azureCliDeploy.yml`)
17+
- `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)
18+
- `REF`: Required. The git reference for the workflow. The reference can be a branch or tag name. ('demo')

.github/workflows/azureCliDeploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
- name: Upload to blob storage
3030
uses: azure/CLI@v1
3131
with:
32-
azcliversion: 2.0.72
3332
inlineScript: |
3433
az storage blob upload-batch -d '$web' -s dist --account-name ngxadmin --debug
3534

.github/workflows/docsDeploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'docs/**'
1010
repository_dispatch:
1111
types: deploy-docs
12-
12+
workflow_dispatch:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)