Merge pull request #225 from dscc-admin-ch/wip_367_min-demo #176
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate docs and push to dedicated repo for publishing | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python 12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
pip install -r core/requirements_core.txt | |
pip install -r client/requirements_client.txt | |
pip install -r server/requirements_server.txt | |
- name: Build with sphinx | |
run: | | |
sudo apt-get install pandoc | |
pip install sphinx nbsphinx sphinx-rtd-theme sphinxcontrib.napoleon myst-parser | |
cd docs | |
python3.12 build_docs.py | |
cd ../pages/ | |
ls | |
- name: Pushes to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY_DOCS }} | |
with: | |
source-directory: pages/ | |
destination-github-username: 'dscc-admin-ch' | |
destination-repository-name: 'lomas-docs' | |
target-branch: main | |
target-directory: html | |