Clusters topic guide #828
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: docswithmkdoc | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
generate-files: | |
runs-on: ubuntu-20.04 | |
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | |
steps: | |
#---------------------------------------------- | |
# check-out repo and set-up python | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9.10 | |
#---------------------------------------------- | |
# -- save a few section by caching poetry -- | |
#---------------------------------------------- | |
- name: Load cached Poetry installation | |
uses: actions/cache@v2 | |
with: | |
path: ~/.local # the path depends on the OS | |
key: poetry-0 # increment to reset cache | |
#---------------------------------------------- | |
# ----- install & configure poetry ----- | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: '1.7.0' | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
#---------------------------------------------- | |
# load cached venv if cache exists | |
#---------------------------------------------- | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-00 | |
#---------------------------------------------- | |
# install dependencies if cache does not exist | |
#---------------------------------------------- | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
#---------------------------------------------- | |
# install your root project, if required | |
#---------------------------------------------- | |
- name: Install library | |
run: poetry install --no-interaction | |
- name: Generate comparison/level library dialect + dataset tables | |
run: | | |
source .venv/bin/activate | |
mv scripts/generate_dialect_comparison_docs.py generate_dialect_comparison_docs.py | |
mv scripts/generate_dataset_docs.py generate_dataset_docs.py | |
python generate_dialect_comparison_docs.py | |
python generate_dataset_docs.py | |
- name: Upload generated docs files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: generated_files | |
path: docs/includes/generated_files | |
deploy: | |
runs-on: ubuntu-latest | |
needs: generate-files | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: generated_files | |
path: docs/includes/generated_files | |
- name: Preprocess markdown include files | |
run: python3 scripts/preprocess_markdown_includes.py | |
- run: tree docs/ | |
- run: pip install --upgrade pip | |
- run: pip install -r scripts/docs-requirements.txt && mkdocs gh-deploy --force | |
- run: pip freeze | |
- run: mkdocs --version | |
- run: tree docs/ |