Skip to content

Remove shifting of coordinates #2324

Remove shifting of coordinates

Remove shifting of coordinates #2324

Workflow file for this run

name: Build and deploy docs
on:
pull_request:
push:
branches: [main]
tags:
- '*'
jobs:
build-deploy-docs:
# Only run this job on the popsim-consortium repository.
# The job would fail on forks anyhow, because the secret used below
# POPSIMBOT_STDPOPSIM_DOCS_TOKEN
# won't be valid. But to avoid confusion, we explicitly restrict the scope.
# See https://github.com/popsim-consortium/stdpopsim/issues/662
if: github.repository == 'popsim-consortium/stdpopsim'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install deps
run: |
python -m pip install wheel
python -m pip install numpy==1.19.2 # for scikit-allel
python -m pip install -r requirements/CI/requirements.txt
# Install the local package so that stdpopsim is in the path,
# which is needed for generating docs `command-output`.
python -m pip install .
- name: Build Docs
run: make -C docs
- name: Checkout docs site
if: (!github.event.pull_request)
uses: actions/checkout@v2
with:
repository: popsim-consortium/stdpopsim-docs
token: ${{ secrets.POPSIMBOT_STDPOPSIM_DOCS_TOKEN }}
path: stdpopsim-docs
- name: Copy our docs to the tag specific location
if: (!github.event.pull_request)
run: |
cd stdpopsim-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 stdpopsim-docs
git config user.name PopSim-bot
git config user.email graham.gower+popsim-bot@gmail.com
git add .
git diff-index --quiet HEAD || git commit -m "Automated doc build for ${GITHUB_REF}"
git push