1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
name: deployment
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
if: ${{ contains(github.event.head_commit.message, '#deploy') }}
steps:
- uses: actions/checkout@v2
- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_S3_UPLOAD_ID }}
aws-secret-access-key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws-region: ap-northeast-1
- name: Upload to S3
run: |
aws s3 sync ./ s3://${{ secrets.AWS_S3_HUGO_BUCKET }} --exclude ".git/*" --exclude ".github/*"
|