ci: don't test build branch w/o pull request #173
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: Documentation | |
on: | |
push: | |
branches: [master, dev] | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
jobs: | |
Documentation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install '.[dev]' | |
- name: Set up Git | |
run: | | |
git config user.name ${{ github.actor }} | |
git config user.email ${{ github.actor }}@users.noreply.github.com | |
- name: Build documentation | |
run: | | |
git fetch origin gh-pages | |
mike delete $BRANCH_NAME | |
mike deploy --push $BRANCH_NAME |