Repository navigation
66 lines (56 loc) · 1.53 KB
/
Copy pathdeploy-pages.yml
File metadata and controls
66 lines (56 loc) · 1.53 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 staging
on:
push:
branches: [main]
paths: ['.github/workflows/deploy-pages.yml']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: github-pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Check out the documentation branch
uses: actions/checkout@v4
with:
repository: codeboltai/codeboltdocs
ref: restructure
persist-credentials: false
- name: Configure GitHub Pages
id: pages
uses: actions/configure-pages@v5
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
- name: Install dependencies
run: npm ci
- name: Build the staging site
run: npm exec -- docusaurus build --no-minify
env:
NODE_OPTIONS: --max-old-space-size=8192
DOCUSAURUS_PERF_LOGGER: 'true'
CODEBOLT_DOCS_SITE_URL: ${{ steps.pages.outputs.origin }}
CODEBOLT_DOCS_BASE_PATH: ${{ steps.pages.outputs.base_path }}
- name: Upload the site
uses: actions/upload-pages-artifact@v3
with:
path: build
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Publish to staging
id: deployment
uses: actions/deploy-pages@v4