-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (87 loc) · 2.46 KB
/
Copy pathdocs.yaml
File metadata and controls
99 lines (87 loc) · 2.46 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: docs
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'pnpm-workspace.yaml'
- 'pnpm-lock.yaml'
- 'package.json'
- '.github/workflows/docs.yaml'
pull_request:
paths:
- 'docs/**'
- 'pnpm-workspace.yaml'
- 'pnpm-lock.yaml'
- 'package.json'
- '.github/workflows/docs.yaml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: '24'
PNPM_VERSION: '9'
jobs:
build:
name: build & check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Astro check (typecheck)
working-directory: docs
run: pnpm exec astro check || true
# GitHub Pages serves this repo's site under /stig-manager-react/.
# Override DOCS_SITE + DOCS_BASE so every CSS/JS asset URL emitted
# by Astro is prefixed correctly. On the canonical apex domain
# (deployed separately) these env vars are unset and Astro falls
# back to the defaults in astro.config.mjs.
- name: Build
env:
DOCS_SITE: https://exonical.github.io
DOCS_BASE: /stig-manager-react
run: pnpm --filter docs build
- name: Upload built site
uses: actions/upload-artifact@v4
with:
name: docs-site
path: docs/dist
if-no-files-found: error
retention-days: 14
deploy:
name: deploy preview / production
runs-on: ubuntu-24.04
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download built site
uses: actions/download-artifact@v4
with:
name: docs-site
path: dist
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist
- id: deployment
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4