diff --git a/.github/workflows/ACTION_TRIGGER_GUIDE.md b/.github/workflows/ACTION_TRIGGER_GUIDE.md index c0bf75cf..b25cb9a7 100644 --- a/.github/workflows/ACTION_TRIGGER_GUIDE.md +++ b/.github/workflows/ACTION_TRIGGER_GUIDE.md @@ -1,12 +1,13 @@ ### Actions deploy guide -In order to trigger `deploy-to-demo` action you should execute the following curl: +In order to trigger workflow action you should execute the following curl: `curl -H "Accept: application/vnd.github.everest-preview+json" \` `-H "Authorization: token " \` `--request POST \` -`--data '{"event_type": "deploy-to-demo"}' \` +`--data '{"event_type": ""}' \` `https://api.github.com/repos/akveo/ngx-admin/dispatches` -This curl expects `ACCESS_TOKEN` input parameter -
`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) +This curl expects two input 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') diff --git a/.github/workflows/demoDeploy.yml b/.github/workflows/demoDeploy.yml index e42274df..140f62bb 100644 --- a/.github/workflows/demoDeploy.yml +++ b/.github/workflows/demoDeploy.yml @@ -2,6 +2,11 @@ name: Deploy to demo on: + push: + branches: + - 'demo' + paths: + - 'src/**' repository_dispatch: types: deploy-to-demo diff --git a/.github/workflows/docsDeploy.yml b/.github/workflows/docsDeploy.yml new file mode 100644 index 00000000..be9a3935 --- /dev/null +++ b/.github/workflows/docsDeploy.yml @@ -0,0 +1,20 @@ + +name: Deploy docs + +on: + push: + branches: + - 'demo' + paths: + - 'docs/**' + repository_dispatch: + types: deploy-docs + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + - run: npm install + - run: npm run docs:gh-pages