Skip to content

Commit

Permalink
Add docs deployment workflow (#5081)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansermino authored Dec 17, 2024
1 parent 74bff71 commit 68b13b6
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
# See https://github.com/actions/setup-node/issues/1027
# cache: yarn
- run: corepack enable
- run: yarn install --frozen-lockfile
- run: yarn run 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 }}

0 comments on commit 68b13b6

Please sign in to comment.