-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (47 loc) · 1.37 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy site
on:
workflow_call:
inputs:
artifact-name:
required: true
type: string
secrets:
AWS_IAM_ROLE_GITHUB:
required: true
permissions:
id-token: write
env:
AWS_REGION: us-east-1
S3_BUCKET: oyam.ca
concurrency:
group: site-deploy-${{ github.ref_name }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Download website artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: public
- name: Download tools
run: curl -LO https://github.com/mayo/oyam.ca-tools/releases/download/v0.0.1/deploy_aws_s3-x86_64-linux.zip
- name: Extract tools
run: unzip deploy_aws_s3-x86_64-linux.zip
- name: Setup Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE_GITHUB }}
role-session-name: GitHub-Action-Role
aws-region: ${{ env.AWS_REGION }}
- name: debug
run: ls -la
- name: Upload website to S3
#run: aws s3 sync --acl public-read --delete public/ s3://${{ env.S3_BUCKET }}/
run: ./sync_s3 --bucket ${{ env.S3_BUCKET }} public/ -v -a public-read -d
# invalidate-cache:
# runs-on: ubuntu-latest
# steps:
# - name: Foo
# uses: foo