-
Notifications
You must be signed in to change notification settings - Fork 19
75 lines (66 loc) · 1.91 KB
/
Copy pathdeploy_documentation.yml
File metadata and controls
75 lines (66 loc) · 1.91 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
name: Deploy Docusaurus to GitHub Pages
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call: # Add this to make the workflow reusable
workflow_dispatch: # Add this to allow manual triggering
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: ./docs/package-lock.json
- name: Install dependencies
working-directory: ./docs
run: npm ci
- name: Fetch contributors
working-directory: ./docs
run: npm run fetch-contributors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docusaurus site
working-directory: ./docs
run: npm run build
- name: Create CNAME file
working-directory: ./docs/build
run: echo "docs.opengatellm.org" > CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
# dns:
# runs-on: ubuntu-latest
#
# env:
# OVH_APP_KEY: ${{ secrets.OVH_APP_KEY }}
# OVH_APP_SECRET: ${{ secrets.OVH_APP_SECRET }}
# OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }}
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
#
# - name: Configure Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.12'
#
# - name: Install dependencies
# run: pip install ovh
#
# - name: Run DNS management script
# run: python scripts/manage_docs_dns.py