Merge pull request #412 from fishbrain/dependabot/npm_and_yarn/postcs… #174
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: Deploy | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://engineering.fishbrain.com | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1 | |
with: | |
aws-region: eu-west-1 | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
- name: Install | |
run: yarn --immutable | |
- name: Build | |
run: yarn build | |
- name: Deploy | |
if: ${{ success() }} | |
run: | | |
echo "Deploying production to ${{ secrets.S3_OUTPUT_URL }} from Github environment" | |
echo "... uploading to ${{ secrets.S3_OUTPUT_URL }}" | |
aws s3 sync _site ${{ secrets.S3_OUTPUT_URL }} --delete | |
echo "... done" |