Last active
August 1, 2020 02:25
-
-
Save korinVR/e38d5bb282c97c18201ad79fdb6ef190 to your computer and use it in GitHub Desktop.
GitHub Action to build Hugo and deploy to AWS S3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.72.0' | |
# extended: true | |
- name: Build | |
run: hugo --buildFuture | |
- name: Deploy | |
run: aws s3 sync --size-only --region ap-northeast-1 public s3://example.com/ | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment