47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Docs
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
|
|
Docs:
|
|
runs-on: ubuntu-latest
|
|
name: '📓 Docs'
|
|
steps:
|
|
|
|
- name: '🧰 Checkout'
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: 🛠️ Setup environment
|
|
run: |
|
|
sudo apt update -qq
|
|
sudo apt install -y make
|
|
make env
|
|
|
|
- name: 📓 Build the documentation
|
|
run: |
|
|
. ./env/conda/bin/activate f4pga-docs
|
|
make html
|
|
|
|
- name: '📤 Upload artifact: Sphinx HTML'
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Documentation-HTML
|
|
path: _build/html
|
|
|
|
- name: 🚀 Publish site to GitHub Pages
|
|
if: github.event_name != 'pull_request'
|
|
run: |
|
|
cd _build/html
|
|
touch .nojekyll
|
|
git init
|
|
cp ../../.git/config ./.git/config
|
|
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
|