Merge branch 'infra/add-cors' into develop #1031
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master, develop ] | |
pull_request: | |
branches: [ master, develop ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.14.0 | |
- run: yarn --cwd server install | |
- run: yarn --cwd server test | |
- name: Send slack notification | |
uses: act10ns/slack@v1 | |
with: | |
status: ${{ job.status }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
if: failure() | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v2 | |
- name: Get current branch name | |
uses: ./.github/actions/branchName | |
id: vars | |
- name: Request deployment | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
repository: mission-apprentissage/sirius-infra | |
token: ${{ secrets.DEVOPS_ACCESS_TOKEN }} | |
event-type: deploy | |
client-payload: '{"envName": "recette", "branchName":"develop"}' | |
if: steps.vars.outputs.branchName == 'develop' |