mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
feat(docs): try to get wrangler to work...
feat(docs)asdf asdf
This commit is contained in:
parent
fcd2409ee3
commit
b6212c4e98
13
.github/workflows/deploy-docs.yml
vendored
13
.github/workflows/deploy-docs.yml
vendored
@ -86,13 +86,18 @@ jobs:
|
|||||||
test -d site/assets || (echo "ERROR: site/assets directory not found" && exit 1)
|
test -d site/assets || (echo "ERROR: site/assets directory not found" && exit 1)
|
||||||
echo "✅ Site validation passed"
|
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
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
# Deploy using Wrangler (recommended by Cloudflare)
|
# Deploy using Wrangler (with pnpm)
|
||||||
- name: Deploy to Cloudflare Pages
|
- name: Deploy to Cloudflare Pages
|
||||||
id: deploy
|
id: deploy
|
||||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
@ -101,7 +106,7 @@ jobs:
|
|||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: pages deploy site --project-name=trilium-docs --branch=${{ github.ref_name }}
|
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
|
# Deploy preview for PRs
|
||||||
- name: Deploy Preview to Cloudflare Pages
|
- name: Deploy Preview to Cloudflare Pages
|
||||||
@ -112,7 +117,7 @@ jobs:
|
|||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: pages deploy site --project-name=trilium-docs --branch=pr-${{ github.event.pull_request.number }}
|
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
|
# Post deployment URL as PR comment
|
||||||
- name: Comment PR with Preview URL
|
- name: Comment PR with Preview URL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user