Merge pull request #709 from DemocracyClub/prefixes20241204 #25
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: EC Production deploy | |
on: | |
push: | |
branches: | |
- 'master' | |
env: | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }} | |
AWS_REGION: eu-west-2 | |
jobs: | |
install: | |
runs-on: ubuntu-latest | |
name: Install and test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- run: npm install | |
- run: npm test | |
build: | |
needs: install | |
runs-on: ubuntu-latest | |
environment: ec_prod_deploy | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- uses: actions/setup-node@v3 | |
- run: npm install | |
- name: Deploy to production | |
run: ./deploy-ec.sh |