Skip to content

doc: Update examples #210

doc: Update examples

doc: Update examples #210

Workflow file for this run

name: Deploy mdBook site to Pages
on:
push:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
vale:
runs-on: ubuntu-latest
container:
image: jdkato/vale:v2.10.2
steps:
- uses: actions/checkout@v4
- run: vale docs
megalinter:
runs-on: ubuntu-latest
container:
image: oxsecurity/megalinter-documentation
steps:
- uses: actions/checkout@v4
with:
# This action in a docker container means we have a folder structure
# like `docs/docs/docs/index.md` which is confusing the FILTER_REGEX_INCLUDE.
# We clone the repo to this path to differentiate the repo from the `docs`
# folder and configure mega linter to use `documentation` as the workspace.
path: documentation
- name: Mega-linter
run: /entrypoint.sh
env:
VALIDATE_ALL_CODEBASE: true
FILTER_REGEX_INCLUDE: (documentation/docs/)
DEFAULT_WORKSPACE: documentation
build:
runs-on: ubuntu-latest
needs:
- vale
- megalinter
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t mdbook .
- name: Set up Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with mdbook
run: docker run --rm -v$(pwd):/data mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./book/html
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4