From 31d3a1dd2a4f2079dc9747f926033fdebdeda9bf Mon Sep 17 00:00:00 2001 From: "maksim.karatkevich" Date: Thu, 14 May 2020 12:39:22 +0300 Subject: [PATCH] action trigger guide added --- .github/workflows/ACTION_TRIGGER_GUIDE.md | 12 ++++++++++++ .github/workflows/demoDeploy.yml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ACTION_TRIGGER_GUIDE.md diff --git a/.github/workflows/ACTION_TRIGGER_GUIDE.md b/.github/workflows/ACTION_TRIGGER_GUIDE.md new file mode 100644 index 00000000..a9820da5 --- /dev/null +++ b/.github/workflows/ACTION_TRIGGER_GUIDE.md @@ -0,0 +1,12 @@ +### Actions deploy guide + +In order to trigger `deploy-to-demo` 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"}' \ +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) diff --git a/.github/workflows/demoDeploy.yml b/.github/workflows/demoDeploy.yml index 8bf794e0..f783d5b4 100644 --- a/.github/workflows/demoDeploy.yml +++ b/.github/workflows/demoDeploy.yml @@ -21,4 +21,4 @@ jobs: ref: demo - run: npm install - run: npm run build:prod - - run: rsync -r dist/. "${{ secrets.ADDRESS }}":~/views/admin/ngx-demo/dist + - run: rsync -r --delete-after dist/. "${{ secrets.REMOTE_URL }}":"${{ secrets.ADDRESS }}"