mirror of
https://github.com/molstar/molstar.git
synced 2026-06-06 22:54:22 +08:00
63 lines
1.3 KiB
YAML
63 lines
1.3 KiB
YAML
name: Build & Deploy Docs
|
|
|
|
on:
|
|
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
|
|
|
|
- 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
|
|
|
|
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_DEPLOY_KEY }}
|
|
external_repository: molstar/docs
|
|
publish_branch: gh-pages
|
|
publish_dir: ./docs/site
|