45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
deploy-to-pages:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: 🛎️ Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: 🐍 Set up Python 3.9
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: 🧳 Cache pip
|
|
uses: actions/cache@v2
|
|
with:
|
|
# This path is specific to Ubuntu
|
|
path: ~/.cache/pip
|
|
# Look to see if there is a cache hit for the corresponding requirements file
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
${{ runner.os }}-
|
|
|
|
- name: 👷 Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: 🔧 Build PEPs
|
|
run: make pages -j$(nproc)
|
|
|
|
- name: 🚀 Deploy to GitHub pages
|
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
|
with:
|
|
branch: gh-pages # The branch to deploy to.
|
|
folder: build # Synchronise with build.py -> build_directory
|
|
single-commit: true # Delete existing files
|