mirror of
https://github.com/zadam/trilium.git
synced 2025-09-16 11:41:56 +08:00
feat(docs): try to get wrangler to work...
feat(docs)asdf asdf
This commit is contained in:
parent
fcd2409ee3
commit
b6212c4e98
1 changed files with 10 additions and 5 deletions
15
.github/workflows/deploy-docs.yml
vendored
15
.github/workflows/deploy-docs.yml
vendored
|
@ -86,13 +86,18 @@ jobs:
|
|||
test -d site/assets || (echo "ERROR: site/assets directory not found" && exit 1)
|
||||
echo "✅ Site validation passed"
|
||||
|
||||
# Setup Node.js for Wrangler
|
||||
# Setup pnpm
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
# Setup Node.js with pnpm
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'pnpm'
|
||||
|
||||
# Deploy using Wrangler (recommended by Cloudflare)
|
||||
# Deploy using Wrangler (with pnpm)
|
||||
- name: Deploy to Cloudflare Pages
|
||||
id: deploy
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
|
@ -101,7 +106,7 @@ jobs:
|
|||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy site --project-name=trilium-docs --branch=${{ github.ref_name }}
|
||||
packageManager: npm # Explicitly use npm instead of pnpm
|
||||
packageManager: pnpm
|
||||
|
||||
# Deploy preview for PRs
|
||||
- name: Deploy Preview to Cloudflare Pages
|
||||
|
@ -112,7 +117,7 @@ jobs:
|
|||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy site --project-name=trilium-docs --branch=pr-${{ github.event.pull_request.number }}
|
||||
packageManager: npm # Explicitly use npm instead of pnpm
|
||||
packageManager: pnpm
|
||||
|
||||
# Post deployment URL as PR comment
|
||||
- name: Comment PR with Preview URL
|
||||
|
@ -156,4 +161,4 @@ jobs:
|
|||
repo: context.repo.repo,
|
||||
body: commentBody
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue