Skip to content
name: Build and deploy website to github pages
# execute this workflow automatically when a we push to master
on:
push:
branches: [ master ]
jobs:
build_docs_job:
permissions:
contents: write
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install -U sphinx
python -m pip install -r docs/manual/requirements.txt
- name: make the sphinx docs
run: |
cd docs/manual
bash gh_make.sh ../../manual
cd ../..
cp docs/manual/index.html manual
rm -r docs/manual
mv manual docs
# - name: Init new repo in dist folder and commit generated files
# run: |
# cd _build_docs
# git init
# git add -A
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# git commit -m 'deploy'
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
force_orphan: true
# - name: Force push to destination branch
# uses: ad-m/[email protected]
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: gh-pages
# force: true
# directory: ./_build_docs