[docs] Install gems with --user-install #9
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: Build and Deploy Documentation | |
# Defines when the action will run. | |
on: | |
push: | |
branches: | |
- main # Trigger the action on pushes to the main branch | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest # Specifies the runner environment | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 # Checks out your repository under $GITHUB_WORKSPACE | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' # Ensures Python 3.x is installed, adjust as needed for your project | |
- name: Install Asciidoctor and Asciidoctor-Diagram | |
run: | | |
gem install asciidoctor asciidoctor-diagram asciidoctor-pdf --user-install | |
- name: Run Make | |
run: | | |
cd doc # Changes directory to where the Makefile is located | |
PATH=${{ github.workspace }}/.gem/bin:$PATH make ci | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/doc/dist # Adjusts the path to the build output directory |