temporary R0 rule #45
Workflow file for this run
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: Generate Label Documentation | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
workflow_dispatch: | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
# Default to bash | |
defaults: | |
run: | |
shell: bash | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
MDBOOK_VERSION: 0.4.21 # https://github.com/rust-lang/mdBook/releases | |
TERA_VERSION: 0.2.4 # https://github.com/chevdor/tera-cli/release | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Install Tools | |
run: | | |
wget -O ${{ runner.temp }}/mdbook.tar.gz https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz && \ | |
tar xf ${{ runner.temp }}/mdbook.tar.gz && mv mdbook /usr/local/bin && \ | |
wget -O ${{ runner.temp }}/tera.deb https://github.com/chevdor/tera-cli/releases/download/v${TERA_VERSION}/tera-cli_linux_amd64.deb && \ | |
sudo dpkg -i ${{ runner.temp }}/tera.deb | |
- name: Generate the doc | |
run: ./scripts/build-doc.sh | |
- name: Check | |
run: ls -al ./docs/src | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v2 | |
- name: Render book | |
run: ./scripts/generate_book.sh | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./docs/book | |
# Deployment job | |
deploy: | |
# this job will fail unless we are in the main branch | |
# so we skip the job for other branches such as PRs. | |
if: ${{ github.ref == 'refs/heads/main' }} | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |