Some checks failed
Publish ParaWiki / build-and-deploy (push) Failing after 27s
wiki/ 변경 시 Quartz 4로 빌드하여 parawiki.pages.dev에 자동 배포. Gitea Actions Runner가 Quartz 클론 → 의존성 설치 → content 교체 → 빌드 → wrangler deploy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: Publish ParaWiki
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'wiki/**'
|
|
- '.gitea/workflows/publish.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout ParaWiki
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: parawiki
|
|
|
|
- name: Clone Quartz
|
|
run: git clone --depth 1 https://github.com/jackyzha0/quartz.git quartz
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Install Quartz dependencies
|
|
working-directory: quartz
|
|
run: npm ci
|
|
|
|
- name: Patch Quartz config for ParaWiki
|
|
working-directory: quartz
|
|
run: |
|
|
node -e "
|
|
const fs = require('fs');
|
|
let c = fs.readFileSync('quartz.config.ts','utf8');
|
|
c = c.replace(/pageTitle: \".*?\"/, 'pageTitle: \"ParaWiki\"');
|
|
c = c.replace(/baseUrl: \".*?\"/, 'baseUrl: \"parawiki.pages.dev\"');
|
|
c = c.replace(/locale: \".*?\"/, 'locale: \"ko-KR\"');
|
|
fs.writeFileSync('quartz.config.ts', c);
|
|
"
|
|
|
|
- name: Copy wiki content into Quartz
|
|
run: |
|
|
rm -rf quartz/content
|
|
mkdir -p quartz/content
|
|
cp -r parawiki/wiki/. quartz/content/
|
|
rm -f quartz/content/CLAUDE.md
|
|
|
|
- name: Build site
|
|
working-directory: quartz
|
|
run: npx quartz build
|
|
|
|
- name: Deploy to Cloudflare Pages
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
command: pages deploy quartz/public --project-name=parawiki --branch=main --commit-dirty=true
|