style for deveploer #177
This file contains 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: Build and Deploy Hugo Site | |
on: | |
push: | |
branches: [main] | |
jobs: | |
Build_and_Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: "0.82.0" | |
- name: Build | |
run: hugo --minify | |
- name: Deploy to S3 | |
if: github.ref == 'refs/heads/main' | |
run: hugo deploy --force --maxDeletes -1 --invalidateCDN | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |