name: Deploy pages on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version: "1.22.x" - uses: https://code.icb4dc0.de/prskr/setup-hugo@main with: dart-sass: true extended: true - uses: actions/cache@v4 with: path: /home/runner/.cache/hugo_cache key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-hugomod- - name: Build run: | hugo mod get hugo --minify --environment production - name: Copy files to the s3 website content bucket run: aws s3 sync public s3://${{ secrets.HCLOUD_BUCKET }} --delete env: AWS_ACCESS_KEY_ID: ${{ secrets.HCLOUD_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.HCLOUD_SECRET_KEY }} AWS_DEFAULT_REGION: fsn1 AWS_ENDPOINT_URL: ${{ secrets.HCLOUD_ENDPOINT }}