.github/workflows/build_docs.yml #99
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
on: | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
example-3: | |
name: Doc Build | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: c3org | |
- uses: actions/checkout@v2 | |
with: | |
repository: cogent3/cogent3 | |
path: c3src | |
ref: develop | |
- shell: bash -l {0} | |
run: | | |
mv c3src/doc c3org/doc/doc | |
cp c3org/doc/doc/set_working_directory.py c3org/doc/. | |
cp c3org/doc/doc/cogent3.bib c3org/doc/. | |
- name: Setup python | |
uses: "actions/setup-python@v1" | |
with: | |
python-version: "3.12" | |
- name: "Setup virtualenv and install cogent3[dev]" | |
if: startsWith(runner.os, 'macOS') || startsWith(runner.os, 'Linux') | |
run: | | |
python --version | |
python -m venv .venv | |
source .venv/bin/activate | |
python -m pip install --upgrade pip wheel setuptools | |
python -m pip install -r c3org/requirements.txt | |
python -m pip list | |
- name: Build docs | |
shell: bash -l {0} | |
working-directory: c3org/doc/ | |
run: | | |
source ../../.venv/bin/activate | |
export PYDEVD_DISABLE_FILE_VALIDATION=1 | |
make github | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: c3org/docs | |
publish_branch: master |