1
0
forked from kamat/blog

fix workflow 6

This commit is contained in:
2025-09-07 17:52:19 +09:00
parent c05fdc7360
commit 16aa780991

View File

@@ -8,20 +8,23 @@ on:
jobs: jobs:
build-and-deploy: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: node:20-bookworm
env: env:
CF_PAGES_PROJECT: ${{ vars.CF_PAGES_PROJECT }} # 例: blog CF_PAGES_PROJECT: ${{ vars.CF_PAGES_PROJECT }}
PROD_BRANCH: "main" PROD_BRANCH: "main"
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
steps: steps:
- name: Check Node runtime
run: node -v && node -e "console.log('crypto?', !!globalThis.crypto)"
- name: Checkout - name: Checkout
uses: https://github.com/actions/checkout@v4 uses: https://github.com/actions/checkout@v4
- name: Install cobalt (prebuilt) - name: Install cobalt (prebuilt)
shell: bash
run: | run: |
set -euo pipefail
apt-get update && apt-get install -y ca-certificates curl tar git apt-get update && apt-get install -y ca-certificates curl tar git
curl -fsSL https://zyedidia.github.io/eget.sh | sh curl -fsSL https://zyedidia.github.io/eget.sh | sh
./eget cobalt-org/cobalt.rs --to /usr/local/bin/cobalt ./eget cobalt-org/cobalt.rs --to /usr/local/bin/cobalt
@@ -30,7 +33,6 @@ jobs:
- name: Build site with cobalt - name: Build site with cobalt
run: cobalt build # 出力: ./_site run: cobalt build # 出力: ./_site
# --- Wrangler ActionでPagesにデプロイ ---
- name: Deploy to Cloudflare Pages - name: Deploy to Cloudflare Pages
uses: https://github.com/cloudflare/wrangler-action@v3 uses: https://github.com/cloudflare/wrangler-action@v3
with: with: