Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Update web page for archiving repo #91

Update web page for archiving repo

Update web page for archiving repo #91

Workflow file for this run

name: CI
on:
push:
branches:
- master
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: git branch --track dev origin/dev && git branch --track master origin/master
# Standard drop-in approach that should work for most people.
- uses: Hagb/sphinx-action@master
with:
docs-folder: "."
build-command: "bash -c 'cd docs && git config --global --add safe.directory /github/workspace && sphinx-multiversion . _build 2> >(tee /tmp/sphinx-log >&2) && cp redirect.html _build/index.html'"
pre-build-command: "pip install pycryptodome beautifulsoup4 sphinx-multiversion && apt-get update -y && apt-get install -y git"
- name: Commit documentation changes
run: |
git clone https://github.com/$GITHUB_REPOSITORY.git --branch gh-pages --single-branch gh-pages
find gh-pages/ -maxdepth 1 -mindepth 1 ! -name CNAME ! -name .git -exec rm -r '{}' ';'
cp -r docs/_build/* gh-pages/
cd gh-pages
touch .nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Push changes
uses: ad-m/github-push-action@8407731efefc0d8f72af254c74276b7a90be36e1
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}