Render using Quarto and push to GH-pages #12
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: Render using Quarto and push to GH-pages | |
on: workflow_dispatch | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Quarto | |
uses: quarto-dev/quarto-actions/install-quarto@v1 | |
with: | |
# To install LaTeX to build PDF book | |
tinytex: false | |
# uncomment below and fill to pin a version | |
# version: 0.9.105 | |
# Install any computing dependency you may need, usually either python and Jupyter or R | |
# More specific examples will be shared on quarto-dev/quarto-actions project | |
# plantUML can be used to dynamically generate UML diagrams to insert in model documentation | |
# | |
#- name: Install plantuml deps | |
# run: sudo apt-get install -y default-jre graphviz | |
#- name: Install plantuml | |
# run: wget -O plantuml.jar "https://github.com/plantuml/plantuml/releases/download/v1.2022.4/plantuml-1.2022.4.jar" | |
# this just inserts some information in the action log | |
- name: Whereami | |
run: pwd; ls -lah; java -version # java -jar plantuml.jar -version | |
- uses: actions/setup-python@v3 | |
- name: "Install Python deps" | |
run: | | |
pip install -r requirements.txt | |
- name: "install pipx" | |
run: pip install pipx | |
- name: "install vocab_tools" | |
#run: pipx install git+https://github.com/isamplesorg/vocab_tools.git@main | |
run: pipx install git+https://github.com/smrgeoinfo/vocab_tools.git@main | |
# sets up python code to convert skos to markdown; code is run | |
# in generate_vocab_docs.sh | |
- name: Render book to all format | |
# Add any command line argument needed | |
#env: | |
# PLANTUML_BIN: "java -jar ${{ github.workspace }}/plantuml.jar" | |
# ttl to markdown python code is called from the generate_vocab_docs script | |
# Quarto render uses site configuration defined in the _quarto.yml file, | |
# individual page content in the web site is defined by various xxx.qmd files. | |
run: | | |
scripts/generate_vocab_docs.sh; quarto render | |
- name: Deploy 🚀 | |
# only deploy when push to main | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
# The branch the action should deploy to. | |
branch: gh-pages | |
# The folder the action should deploy. Adapt if you changed in Quarto config | |
folder: docs |