Build and deploy Sphinx documentation #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and deploy Sphinx documentation | |
on: | |
push: | |
# Run when new version tag is pushed | |
tags: | |
- v* | |
# Allows running manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Build Sphinx docs | |
run: | | |
mkdir -p docs/_build | |
docker run ghcr.io/${{ github.repository }}:latest make docs | |
docker cp $(docker ps -q -l):/opt/colcon_ws/src/gisnav/docs/_build docs | |
- name: Install node | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install curl | |
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - | |
sudo apt-get install -y nodejs | |
- name: Setup pages | |
uses: actions/configure-pages@v1 | |
#- name: Make "Upload pages artifact" step work with containers | |
# run: | | |
# mkdir -p ${{runner.temp}} | |
# mkdir -p /__w/_temp | |
# ln -s ${{runner.temp}}/artifact.tar /__w/_temp/artifact.tar | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: 'docs/_build/html/' | |
deploy: | |
needs: build | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 |