automatic doc generation #193
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: automatic doc generation | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main","master"] | |
# Run daily | |
schedule: | |
- cron: "0 2 1,10,15,20,25,30 * *" | |
# Allows you to run this workflow manually from the Actions tab | |
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: | |
run-albatros: | |
runs-on: ubuntu-latest | |
name: albatros to gh-pages | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Pages | |
# I am not sure what is this step for... Maybe for the upload-pages to work? | |
uses: actions/configure-pages@v3 | |
- name: Install packages | |
run: | | |
sudo apt-get install -y graphviz | |
sudo snap install svgbob --edge --devmode | |
type svgbob | |
- name: set-up albatros | |
run: | | |
cd src && make setup | |
- name: Generating albatros site | |
run: | | |
( cd src && make html ) | |
cp -a docs _site | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: run-albatros | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |