Merge pull request #445 from fishbrain/dependabot/npm_and_yarn/tailwi… #200
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@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
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" |