-
Notifications
You must be signed in to change notification settings - Fork 3
100 lines (91 loc) · 2.53 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build & Deploy Docs & Viewer
on:
# workflow_dispatch:
push:
branches: master
paths:
- docs/**
- molstar-extension/**
- ".github/workflows/deploy_docs_and_viewer.yml"
pull_request:
branches: master
paths:
- docs/**
- molstar-extension/**
- ".github/workflows/deploy_docs_and_viewer.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 👨🏼💻 checkout
uses: actions/checkout@v4
with:
ref: master
- 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: 🔧 build docs site
run: |
cd docs
mkdocs build
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: viewer dependencies
run: |
cd molstar-extension
npm ci
- name: build viewer site
run: |
cd molstar-extension
npm run build-site
pwd
ls -lt
ls site
- name: Create public
run: |
ls molstar-extension/site
mkdir -p ./public/docs
cp -r docs/site/* ./public/docs/.
cp -r molstar-extension/site/* ./public/.
- name: 🚢 deploy docs and viewer
uses: peaceiris/actions-gh-pages@v4
with:
# deploys docs to
# https://molstar.org/molstar-volseg/docs/docs/site/
deploy_key: ${{ secrets.DOCS_ACTIONS_DEPLOY_KEY }}
# external_repository: molstar/docs
publish_branch: gh-pages
publish_dir: ./public
# destination_dir: ./public
# - name: 🚢 deploy viewer
# uses: peaceiris/actions-gh-pages@v4
# with:
# deploy_key: ${{ secrets.VIEWER_ACTIONS_DEPLOY_KEY }}
# # external_repository: molstar/docs
# publish_branch: gh-pages
# publish_dir: ./molstar-extension/site
# destination_dir: viewer