mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
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 <artem.zaiko.ext@munichgeneral.com>
This commit is contained in:
parent
280fe4df8d
commit
2fdd873ed0
3 changed files with 15 additions and 11 deletions
23
.github/workflows/ACTION_TRIGGER_GUIDE.md
vendored
23
.github/workflows/ACTION_TRIGGER_GUIDE.md
vendored
|
|
@ -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')
|
||||||
|
|
|
||||||
1
.github/workflows/azureCliDeploy.yml
vendored
1
.github/workflows/azureCliDeploy.yml
vendored
|
|
@ -29,7 +29,6 @@ jobs:
|
||||||
- name: Upload to blob storage
|
- name: Upload to blob storage
|
||||||
uses: azure/CLI@v1
|
uses: azure/CLI@v1
|
||||||
with:
|
with:
|
||||||
azcliversion: 2.0.72
|
|
||||||
inlineScript: |
|
inlineScript: |
|
||||||
az storage blob upload-batch -d '$web' -s dist --account-name ngxadmin --debug
|
az storage blob upload-batch -d '$web' -s dist --account-name ngxadmin --debug
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/docsDeploy.yml
vendored
2
.github/workflows/docsDeploy.yml
vendored
|
|
@ -9,7 +9,7 @@ on:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: deploy-docs
|
types: deploy-docs
|
||||||
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue