Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,37 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '22'

- name: Download static site
uses: actions/download-artifact@v7
with:
name: lingxigraph-docs
path: Wiki/out

- name: Validate Cloudflare credentials
shell: bash
run: |
if [ -z "$CLOUDFLARE_API_TOKEN" ]; then
echo "::error::Repository secret CLOUDFLARE_API_TOKEN is missing or empty."
exit 1
fi
if [ -z "$CLOUDFLARE_ACCOUNT_ID" ]; then
echo "::error::Repository secret CLOUDFLARE_ACCOUNT_ID is missing or empty."
exit 1
fi

- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: '4'
command: pages deploy Wiki/out --project-name=lingxigraph-docs
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: >-
npx --yes wrangler@4.122.0 pages deploy Wiki/out
--project-name=lingxigraph-docs
--branch=main
--commit-hash="$GITHUB_SHA"
Loading