2024-10-16 09:13:46 -03:00
|
|
|
name: Build Docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
env:
|
|
|
|
REGISTRY: git.spirirobotics.com
|
|
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: sphinxdoc/sphinx-latexpdf
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install sphinx-rtd-theme
|
2024-10-16 12:55:18 -03:00
|
|
|
run: pip install sphinx-rtd-theme myst-parser
|
2024-10-16 09:13:46 -03:00
|
|
|
- name: Install node so that custom actions work.
|
|
|
|
run : apt-get update && apt-get --yes install nodejs git
|
|
|
|
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Build Docs
|
|
|
|
run: make html latexpdf
|
|
|
|
working-directory: docs # assuming your documentation is in a 'docs' folder
|
|
|
|
|
|
|
|
- name: Save PDF Artifacts
|
|
|
|
run: mv docs/build/latex/*.pdf ${{ github.workspace }}/docs.pdf
|
|
|
|
|
|
|
|
- name: Compress HTML
|
|
|
|
run: tar -czvf docs_html.tar.gz -C docs/build/html .
|
|
|
|
|
|
|
|
- name: Upload Docs
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: docs_html.tar.gz
|
|
|
|
path: docs_html.tar.gz
|
|
|
|
|
|
|
|
- name: Upload PDF
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: docs.pdf
|
|
|
|
path: docs.pdf
|
2024-10-19 13:00:23 -03:00
|
|
|
|
|
|
|
- name: Deploy
|
2024-10-19 14:03:20 -03:00
|
|
|
uses: s0/git-publish-subdir-action@develop
|
|
|
|
env:
|
|
|
|
REPO: self
|
|
|
|
BRANCH: gh-pages
|
|
|
|
FOLDER: ./docs/build/html
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|