Skip to content

Instantly share code, notes, and snippets.

@korinVR
Last active August 1, 2020 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korinVR/e38d5bb282c97c18201ad79fdb6ef190 to your computer and use it in GitHub Desktop.
Save korinVR/e38d5bb282c97c18201ad79fdb6ef190 to your computer and use it in GitHub Desktop.
GitHub Action to build Hugo and deploy to AWS S3
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