Merge pull request #43 from stonecharioteer/post/why-swim #163
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: Publish Github Pages | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
jobs: | |
gh-pages: | |
name: Build website and publish to github-pages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} | |
- name: Install Linux Dependencies | |
run: | | |
sudo apt-get update -qqq | |
sudo apt-get install -y --upgrade libffi-dev git curl libssl-dev make build-essential rsync | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.6 | |
- name: Get Blog Code | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
- name: Install python dependencies, build sphinx website | |
run: | | |
pip install -q --upgrade wheel | |
pip install -q -r requirements.txt | |
make html | |
cp CNAME build/html/ | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git config --local pull.rebase false | |
- name: Deploy built website to stonecharioteer.com | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./build/html |