Skip to content

Build & Deploy Docs & Viewer #29

Build & Deploy Docs & Viewer

Build & Deploy Docs & Viewer #29

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