blog/.forgejo/workflows/deploy.yml
Peter Kurfer c568dfa18f
All checks were successful
Deploy pages / deploy (push) Successful in 34s
feat(ci): use fancy setup-hugo action
2024-05-03 20:54:10 +02:00

34 lines
928 B
YAML

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
- 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: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy public --project-name=blog