-
Notifications
You must be signed in to change notification settings - Fork 188
43 lines (39 loc) · 1.13 KB
/
docs-deploy.yml
File metadata and controls
43 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Docs Deploy
on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs-deploy.yml"
merge_group:
pull_request:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs-deploy.yml"
permissions:
contents: read
deployments: write
pull-requests: write
jobs:
docs-deploy:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-24.04-arm
# Enable workflow for non-PRs but disable workflow for fork PRs as Cloudflare secret does not work for fork PRs
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v4
- run: mise run docs:build
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT_ID }}
command: pages deploy ./docs/build --project-name=forest-docs
gitHubToken: ${{ secrets.GITHUB_TOKEN }}