Skip to content

.github/workflows/cloudflare.yaml #2849

.github/workflows/cloudflare.yaml

.github/workflows/cloudflare.yaml #2849

Workflow file for this run

on:
push:
branches:
- main
schedule:
- cron: "42 */3 * * *"
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
permissions:
contents: read
deployments: write
env:
HUGO_CACHEDIR: ${{ github.workspace }}/.hugo_cache
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: jdx/mise-action@v2
with:
experimental: true
- name: Cache Hugo
uses: actions/cache@v4
with:
path: |
resources/_gen
.hugo_cache
key: ${{ runner.os }}-hugo-live-${{ hashFiles('**/config.yaml', 'go.sum', 'go.mod') }}
restore-keys: |
${{ runner.os }}-hugo-live-
${{ runner.os }}-hugo-
- name: Install Playwright driver (via Go module)
run: go tool playwright install --with-deps
- name: Build
run: just build
- name: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --project-name=kmcd-dev ./live
deploy-future:
runs-on: ubuntu-latest
name: Deploy Future
permissions:
contents: read
deployments: write
env:
HUGO_CACHEDIR: ${{ github.workspace }}/.hugo_cache
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: jdx/mise-action@v2
with:
experimental: true
- name: Cache Hugo
uses: actions/cache@v4
with:
path: |
resources/_gen
.hugo_cache
key: ${{ runner.os }}-hugo-future-${{ hashFiles('**/config.yaml', 'go.sum', 'go.mod') }}
restore-keys: |
${{ runner.os }}-hugo-future-
${{ runner.os }}-hugo-
- name: Install Playwright driver (via Go module)
run: go tool playwright install --with-deps
- name: Build
run: just build-future
- name: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy --project-name=kmcd-dev-future ./future