🔁 Pending modification to operate on types rather than instances #11
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: gh_pages-deploy | |
on: | |
push: | |
branches: | |
- develop | |
- demo/* | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
#---------------------------------------------- | |
# ----- install & configure poetry ----- | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.2 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
#---------------------------------------------- | |
# install dependencies if cache does not exist | |
#---------------------------------------------- | |
- name: Install dependencies | |
run: poetry install -E dev | |
- name: Do Documentation Build | |
run: | | |
poetry run python -m sphinx docs/ _docs/ | |
# Publish built docs to gh_pages branch. | |
# =============================== | |
- name: Commit documentation changes | |
run: | | |
git clone https://github.com/flexcompute/autoflex.git --branch gh_pages --single-branch gh_pages | |
cp -r _docs/* gh_pages/ | |
cd gh_pages | |
touch .nojekyll | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m ":robot: Update `autoflex` github pages" -a || true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: gh_pages | |
directory: gh_pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: true | |
# =============================== |