-
Notifications
You must be signed in to change notification settings - Fork 11
106 lines (90 loc) · 2.99 KB
/
Copy pathdocs.yml
File metadata and controls
106 lines (90 loc) · 2.99 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
100
101
102
103
104
105
106
name: Docs CI
on:
push:
branches: [ master ]
paths:
- docs/**
pull_request:
paths:
- docs/**
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
check:
name: Check docs site
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache deps & types
uses: actions/cache@v4
with:
key: neuropilot-docs-${{ github.repository }}
path: |
docs/.astro
docs/node_modules
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.14.0
cache: 'npm'
cache-dependency-path: "./docs/package-lock.json"
- name: Install deps
run: |
cd docs
npm ci
- name: Run basic checker
run: cd docs && npm run check
build:
name: Build docs site
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache deps, types, output
uses: actions/cache@v4
with:
key: neuropilot-docs-${{ github.repository }}
path: |
docs/.astro
docs/dist
docs/node_modules
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.14.0
cache: 'npm'
cache-dependency-path: "./docs/package-lock.json"
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install deps
run: |
cd docs
npm ci
- name: Build site
working-directory: ${{ github.workspace }}/docs
run: npm run build
- name: Upload GitHub Pages Artifact
uses: actions/upload-pages-artifact@2d163be3ddce01512f3eea7ac5b7023b5d643ce1 # Pinning to SHA because that thing hasn't updated in a year it seems
with:
path: docs/dist
deploy:
name: Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy -> GitHub Pages
id: deployment
uses: actions/deploy-pages@v4