Skip to content

Rewrite profile

Rewrite profile #117

Workflow file for this run

name: Build for Cloudflare
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.110.0"
- name: build
run: make publish-cloudflare
- name: Publish to Preview Env
uses: cloudflare/pages-action@1
if: github.event_name == 'pull_request' && github.event.pull_request.merged == false
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: "karlhaworth-com-hugo"
directory: "public"
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${GITHUB_REF#refs/heads/}
- name: Publish to Prod
uses: cloudflare/pages-action@1
if: github.event_name != 'pull_request'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: "karlhaworth-com-hugo"
directory: "public"
gitHubToken: ${{ secrets.GITHUB_TOKEN }}