Skip to content

Use explicitely named options and set default values #14

Use explicitely named options and set default values

Use explicitely named options and set default values #14

Workflow file for this run

name: Deploy to Github Pages
on:
push:
branches:
- "main"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.4.2"
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Cache Python deps
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install Python dependencies
run: poetry install
- name: Build files from sources
run: |
poetry run python main.py \
--ignored-dirs '.obsidian,.git' \
--verbose \
--source-dir sources \
--base-dir . \
--template-dir templates \
build
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Node dependencies
run: npm ci
- uses: actions/cache@v3
name: Cache Node deps
with:
path: ./node_modules
key: venv-${{ hashFiles('package-lock.json') }}
- name: Prepare workspace
run: |
mv build wiki
mv wiki/links.json .vitepress/links.json
- name: Build static files
run: npm run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: .vitepress/dist
deploy:
environment:
name: github-pages
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2