-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1020 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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"