Typesupport abstraction (#20) #77
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: docs | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
# Build job | |
build-doc: | |
runs-on: ubuntu-latest | |
container: | |
image: ros:humble-ros-base | |
steps: | |
- run: | | |
apt-get update -y | |
apt-get install -y wget gcc ros-humble-rcl ros-humble-builtin-interfaces ros-humble-std-srvs | |
wget -O /tmp/choosenim-init.sh https://nim-lang.org/choosenim/init.sh | |
sh /tmp/choosenim-init.sh -y | |
echo ~/.nimble/bin >> $GITHUB_PATH | |
~/.nimble/bin/choosenim devel | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/configure-pages@v3 | |
- run: git config --global --add safe.directory /__w/rclnim/rclnim | |
- run: nimble install -y --verbose | |
- run: | | |
source /opt/ros/humble/setup.bash | |
cd src | |
nim doc \ | |
--index:on \ | |
--project \ | |
--git.url:https://github.com/${{ github.repository }} \ | |
--git.commit:main \ | |
--git.devel:main \ | |
--out:../_site \ | |
rclnim.nim || true | |
shell: bash | |
- run: cp _site/${{ github.event.repository.name }}.html _site/index.html | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build-doc | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |