.github/workflows/cloudflare.yaml #318
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "42 */3 * * *" | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy | |
permissions: | |
contents: read | |
deployments: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.24.3' | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: '0.147.3' | |
extended: true | |
- name: Install D2 CLI | |
run: curl -fsSL https://d2lang.com/install.sh | sh -s -- | |
- name: Build | |
run: make 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 | |
- name: Build | |
run: make 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 |