Merge pull request #189 from isamplesorg/develop #80
This file contains hidden or 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: Build and publish documentation | |
| # Docs are built with a push to main or when triggered manually. | |
| # Docs are placed in the gh-pages branch. | |
| # | |
| # Note that manually triggering this action from another branch | |
| # will replace the gh-pages branch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| github-pages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: for running under act on mac os | |
| run: | | |
| # Hack to get setup-python to work on act | |
| if [ ! -f "/etc/lsb-release" ] ; then | |
| echo "DISTRIB_RELEASE=22.04" > /etc/lsb-release | |
| fi | |
| - uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| version: 1.6.40 | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| #- name: Make directory for output (workaround for permissions issue) | |
| # run: mkdir -p ${{ github.workspace }}/build/docs/vocabularies | |
| #- name: Parse vocabularies | |
| # uses: isamplesorg/vocabularies@main | |
| # with: | |
| # action: docs | |
| # path: ${{ github.workspace }}/build/docs/vocabularies | |
| #- name: List the output of the vocabulary | |
| # run: ls -l ${{ github.workspace }}/build/docs/vocabularies | |
| - name: Render documentation | |
| run: make gen-docs | |
| - name: List the output of the docs directory | |
| run: ls -l ${{ github.workspace }}/build/docs/ | |
| - name: Publish documentation | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs |