Update requirements.txt and some CI config #227
Workflow file for this run
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: Build and deploy docs | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
tags: ['*'] | |
jobs: | |
build-deploy-docs: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: pip install -r requirements_CI.txt | |
- name: Build Docs | |
run: make -C docs | |
- name: Checkout docs site | |
if: (!github.event.pull_request) | |
uses: actions/checkout@v3 | |
with: | |
repository: popsim-consortium/demes-spec-docs | |
token: ${{ secrets.POPSIMBOT_DEMES_SPEC_DOCS_TOKEN }} | |
path: demes-spec-docs | |
- name: Copy our docs to the tag specific location | |
if: (!github.event.pull_request) | |
run: | | |
cd demes-spec-docs | |
export DEST=`echo ${GITHUB_REF} | sed -e "s/refs\/heads\///g" | sed -e "s/refs\/tags\///g"` | |
rm -rf $DEST | |
cp -r ../docs/_build/html $DEST | |
- name: Commit and push the docs | |
if: (!github.event.pull_request) | |
run: | | |
cd demes-spec-docs | |
git config user.name PopSim-bot | |
git config user.email [email protected] | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Automated doc build for ${GITHUB_REF}" | |
git push |