Merge pull request #26 from jjmccoy/main #28
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: Deploy to Github.io | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_and_deploy: | |
name: Build site and deploy | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: test build of website | |
if: github.ref != 'refs/heads/main' | |
run: | | |
mkdocs build | |
- name: deploy to github.io | |
if: github.ref == 'refs/heads/main' | |
run: | | |
mkdocs gh-deploy --force |