-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (77 loc) · 2.08 KB
/
deploy_docs_and_viewer.yml
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
name: Build & Deploy Docs & Viewer
on:
workflow_dispatch:
# push:
# branches: master
# paths:
# - docs/**
# - ".github/workflows/docs.yml"
# pull_request:
# branches: master
# paths:
# - docs/**
# - ".github/workflows/docs.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 👨🏼💻 checkout
uses: actions/checkout@v4
with:
ref: documentation_v2
- name: 🐍 python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: ⛓️ docs dependencies
run: |
pip install mkdocs-material
- name: install node
uses: actions/setup-node@v4
with:
node-version: 20
- name: viewer dependencies
run: |
npm install
- name: 🔧 build docs site
run: |
cd docs
mkdocs build
- name: build viewer site
run: |
cd molstar-extension
npm run build-site
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: 👨🏼💻 checkout
uses: actions/checkout@v4
- name: 🐍 python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: ⛓️ dependencies
run: |
pip install mkdocs-material
- name: 🔧 build site
run: |
cd docs
mkdocs build
- name: 🚢 deploy docs
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.DOCS_AND_VIEWER_ACTIONS_DEPLOY_KEY }}
# external_repository: molstar/docs
publish_branch: gh-pages
publish_dir: ./docs/site
destination_dir: docs
- name: 🚢 deploy viewer
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.DOCS_AND_VIEWER_ACTIONS_DEPLOY_KEY }}
# external_repository: molstar/docs
publish_branch: gh-pages
publish_dir: ./molstar-extension/site
destination_dir: viewer