Skip to content
name: snippets.pichler.network CI/CD
on: [push]
jobs:
publish_on_production:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
ROOT_PROJECT_FOLDER: ${{ github.workspace }}
steps:
- name: Cache...
id: cache_checkout
uses: actions/cache@v2
with:
path: ${{ env.ROOT_PROJECT_FOLDER }}
key: ${{ runner.os }}-cache-${{ github.sha }}
- name: Check out repository code
uses: actions/checkout@v2
with:
submodules: 'true'
if: steps.cache_checkout.outputs.cache-hit != 'true'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.83.1'
extended: true
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
# aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }} # if you have/need it
aws-region: us-east-2
- run: ls -R .
- run: hugo --minify
- run: hugo deploy s3