Juvix Docs CI #210
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: Juvix Docs CI | |
"on": | |
workflow_dispatch: | |
inputs: | |
build-type: | |
type: choice | |
description: "Docs build type" | |
default: "release" | |
options: | |
- "dev" | |
- "release" | |
ref: | |
description: the repository ref to build | |
required: true | |
default: main | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}" | |
cancel-in-progress: true | |
env: | |
GIT_COMMITTER_NAME: juvix-docs-ci | |
GIT_COMMITTER_EMAIL: [email protected] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout our repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install the latest Juvix compiler | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: anoma/juvix | |
tag: latest | |
chmod: 0755 | |
- name: Check Juvix version | |
run: | | |
juvix --version | |
- uses: actions/cache@v3 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11.1" | |
check-latest: true | |
cache: "pip" | |
- uses: pre-commit/[email protected] | |
- name: Generate HTML files from examples | |
run: | | |
make html-examples | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --user -r requirements.txt | |
- name: Build prerequisites | |
run: | | |
make pre-build | |
- name: Test building without material-insides | |
run: | | |
MKDOCSCONFIG=mkdocs.yml make docs | |
- name: Setup Git | |
run: | | |
git config --global user.name "${GIT_COMMITTER_NAME}" | |
git config --global user.email "${GIT_COMMITTER_EMAIL}" | |
- name: Install material-insiders | |
if: >- | |
github.ref == 'refs/heads/main' | |
run: | | |
pip install --user -r insiders.requirements.txt | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: deploy documentation | |
if: >- | |
github.ref == 'refs/heads/main' | |
run: | | |
MKDOCSCONFIG=mkdocs.insiders.yml make ${{ github.event.inputs.build-type }} | |
env: | |
RUN_GITHUB_ACTION: ${{ secrets.RUN_GITHUB_ACTION }} |