Skip to content

Build and deploy docs #8

Build and deploy docs

Build and deploy docs #8

name: Build and deploy docs
on:
# Push trigger is disabled because the Docker container that builds the docs
# in this workflow will not have the new tag, meaning the API reference would
# have the wrong version tag displayed (commit would still be correct). Need to
# build a new Docker image and then use that to build and deploy the docs.
#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 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/vitepress/docs/.vitepress/dist docs
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Configure pages
uses: actions/configure-pages@v4
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: "docs/dist"
deploy:
needs: build
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy pages
id: deployment
uses: actions/deploy-pages@v4