-
Notifications
You must be signed in to change notification settings - Fork 16
56 lines (50 loc) · 1.56 KB
/
deploy-docusaurus-docs.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: deploy-docusaurus-docs
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
DOCS_URL: ${{ vars.DOCS_URL }}
DOCS_ALGOLIA_APP_ID: ${{ vars.DOCS_ALGOLIA_APP_ID }}
DOCS_ALGOLIA_API_KEY: ${{ vars.DOCS_ALGOLIA_API_KEY }}
DOCS_ALGOLIA_INDEX: ${{ vars.DOCS_ALGOLIA_INDEX }}
DOCS_SEGMENT_WRITE_KEY: ${{ vars.DOCS_SEGMENT_WRITE_KEY }}
# Trigger the workflow when:
on:
# A push occurs to one of the matched branches.
push:
branches:
- main
paths:
- apps/docs/**
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-deploy:
# NOTE: This name appears in GitHub's Checks API.
name: build-deploy
environment: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
cache: "pnpm"
node-version: "20.x"
- name: Build
run: pnpm build:docs
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: "apps/docs"
command: pages deploy build --project-name=docs-opensource-observer