2022-02-09 09:42:50 -05:00
|
|
|
name: Docs
|
|
|
|
|
|
|
|
on:
|
2022-04-06 17:26:02 -04:00
|
|
|
workflow_call:
|
2022-02-09 09:42:50 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
Docs:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: '📓 Docs'
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: '🧰 Checkout'
|
2022-03-30 12:08:25 -04:00
|
|
|
uses: actions/checkout@v3
|
2022-02-09 09:42:50 -05:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: 🛠️ Setup environment
|
|
|
|
run: |
|
|
|
|
sudo apt update -qq
|
|
|
|
sudo apt install -y make
|
|
|
|
make env
|
|
|
|
|
|
|
|
- name: 📓 Build the documentation
|
|
|
|
run: |
|
2022-02-21 12:38:05 -05:00
|
|
|
. ./env/conda/bin/activate f4pga-docs
|
2022-02-09 09:42:50 -05:00
|
|
|
make html
|
|
|
|
|
|
|
|
- name: '📤 Upload artifact: Sphinx HTML'
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Documentation-HTML
|
2022-02-09 21:19:21 -05:00
|
|
|
path: _build/html
|
2022-02-09 09:42:50 -05:00
|
|
|
|
|
|
|
- name: 🚀 Publish site to GitHub Pages
|
|
|
|
if: github.event_name != 'pull_request'
|
|
|
|
run: |
|
2022-02-09 21:19:21 -05:00
|
|
|
cd _build/html
|
2022-02-09 09:42:50 -05:00
|
|
|
touch .nojekyll
|
|
|
|
git init
|
2022-02-09 21:19:21 -05:00
|
|
|
cp ../../.git/config ./.git/config
|
2022-02-09 09:42:50 -05:00
|
|
|
git add .
|
|
|
|
git config --local user.email "BuildTheDocs@GitHubActions"
|
|
|
|
git config --local user.name "GitHub Actions"
|
|
|
|
git commit -a -m "update ${{ github.sha }}"
|
|
|
|
git push -u origin +HEAD:gh-pages
|