-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 905 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
name: Jacob's Website Deployment
on:
repository_dispatch:
types: [build]
push:
branches:
- master
env:
BUCKET_NAME : ${{ secrets.AWS_BUCKET }}
IAM_ROLE: ${{ secrets.IAM_ROLE }}
AWS_REGION : "us-east-1"
# permission can be added at job level or workflow level
permissions:
id-token: write
contents: read # This is required for actions/checkout
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ env.IAM_ROLE }}
role-session-name: samplerolesession
aws-region: ${{ env.AWS_REGION }}
- name: Deploy to S3
env:
aws_bucket: ${{ secrets.AWS_BUCKET }}
folder: docs
run: |
cd $folder
aws s3 sync . s3://$aws_bucket/