-
Notifications
You must be signed in to change notification settings - Fork 21
61 lines (50 loc) · 1.55 KB
/
build_and_deploy_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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: 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: Configure pages
uses: actions/configure-pages@v1
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
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-20.04
steps:
- name: Deploy pages
id: deployment
uses: actions/deploy-pages@v3