Merge branch 'onebox' #116
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: Update Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Generate HTML files | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install pipenv | |
run: | | |
python -m pip install --upgrade pipenv wheel | |
- name: Install dependencies | |
run: | | |
pipenv install --deploy --dev | |
- name: Make | |
run: | | |
pipenv run make html | |
# 2. Add and commit HTML files to gh-pages branch | |
- name: Commit documentation changes | |
run: | | |
git clone https://github.com/${{ github.repository_owner }}/gui-docs.git --branch gh-pages --single-branch gh-pages | |
cd gh-pages | |
rm -rf * | |
cp -r ../docs/html/* . | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update documentation" -a || true | |
# 3. Push changes to gh-pages branch (updates documentation page) | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: gh-pages | |
directory: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} |