|
| 1 | +########################################################################### |
| 2 | +# GitHub Action Workflow |
| 3 | +# On push to the develop branch (which should only be done through PR) |
| 4 | +# in GitHub this action will trigger a deploy job within CircleCI for the |
| 5 | +# deployment and e2e testing of the develop environment. |
| 6 | +# |
| 7 | +# Step 0: Checkout latest commit on develop |
| 8 | +# |
| 9 | +# Step 1: Makes a request to the V2 CircleCI API to initiate the project, |
| 10 | +# which will filter based upon the branch to initiate the |
| 11 | +# workflow/jobs listed here: |
| 12 | +# staging-deployment:[ |
| 13 | +# deploy-project-updates-site, |
| 14 | +# deploy-infrastructure-develop, |
| 15 | +# deploy-develop, |
| 16 | +# test-deployment-e2e |
| 17 | +# ] |
| 18 | +# |
| 19 | +# Leverages the open source GitHub Action: |
| 20 | +# https://github.com/promiseofcake/circleci-trigger-action |
| 21 | +########################################################################### |
| 22 | +name: Deploy Develop on PR Merge |
| 23 | +on: |
| 24 | + push: |
| 25 | + branches: |
| 26 | + - develop |
| 27 | + paths_ignore: |
| 28 | + - 'docs/**' |
| 29 | + - '**.md' |
| 30 | + - '**.txt' |
| 31 | + - '.gitattributes' |
| 32 | + - '.gitignore' |
| 33 | + - 'LICENSE' |
| 34 | +jobs: |
| 35 | + merge_deployment: |
| 36 | + if: github.ref == 'refs/heads/develop' |
| 37 | + runs-on: ubuntu-latest |
| 38 | + name: Initiate deploy job in CircleCI |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v2 |
| 41 | + - name: Circle CI Deployment Trigger |
| 42 | + id: curl-circle-ci |
| 43 | + uses: promiseofcake/circleci-trigger-action@v1 |
| 44 | + with: |
| 45 | + user-token: ${{ secrets.CIRCLE_CI_V2_TOKEN }} |
| 46 | + project-slug: raft-tech/TANF-app |
| 47 | + branch: ${{ github.ref }} |
| 48 | + payload: '{"develop_branch_deploy": true, "target_env": "develop"}' |
0 commit comments