-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.14 KB
/
deploy.yml
File metadata and controls
44 lines (37 loc) · 1.14 KB
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
43
44
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: corepack enable
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
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"