-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (56 loc) · 1.81 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
66 lines (56 loc) · 1.81 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Deploy Documentation
# Publish docs when a version is released (changesets creates a GitHub Release on publish), so the
# site documents the latest *released* library — and also when the docs themselves change on main
# (theme bumps, content edits), since those need no library release to be worth shipping.
on:
release:
types: [published]
push:
branches: [main]
paths:
- "docs/**"
- "pnpm-workspace.yaml"
- ".github/workflows/deploy-docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
# A version bump can publish several Releases at once (monorepo); collapse that burst of events
# for the same commit into a single Pages deploy — the latest run cancels earlier ones.
group: pages
cancel-in-progress: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6
- name: Build documentation
run: pnpm --filter ./docs exec turbo build
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
with:
path: docs/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5