mirror of
https://github.com/im-tomu/fomu-workshop.git
synced 2024-09-20 03:10:12 +00:00
ci: add GitHub Actions workflow 'doc'
This commit is contained in:
parent
f7055f039e
commit
f8d1b7b408
41
.github/workflows/doc.yml
vendored
Normal file
41
.github/workflows/doc.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
name: 'doc'
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
sphinx:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
cd docs
|
||||
make env
|
||||
pip3 install -U wheel setuptools
|
||||
pip3 install -r requirements.txt
|
||||
make html
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docs
|
||||
path: docs/_build/html
|
||||
|
||||
- name: Publish site to gh-pages
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
cd docs/_build/html
|
||||
touch .nojekyll
|
||||
git init
|
||||
cp ../../../.git/config ./.git/config
|
||||
git add .
|
||||
git config --local user.email "push@gha"
|
||||
git config --local user.name "GHA"
|
||||
git commit -a -m "update ${{ github.sha }}"
|
||||
git push -u origin +HEAD:gh-pages
|
Loading…
Reference in New Issue
Block a user