Skip to content

Improvements

Improvements #62

Workflow file for this run

name: Deploy Website
on:
push:
paths: ["content/**", "static/**", "langs/**", "templates/**", "config.toml"]
branches: [main]
pull_request:
paths: ["content/**", "static/**", "langs/**", "templates/**", "config.toml"]
workflow_dispatch:
env:
# Output directory where built files will deploy. This also will be used on Pagefind search generation.
outdir: HTML
defaults:
run:
shell: bash
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Zola
uses: taiki-e/install-action@zola
- name: Install Python Requirements
run: pip install -r requirements.txt
- name: Build the site
run: zola build
# Ignore below name if you do not use pagefind.
- name: Generate Pagefind Search
run: python -m pagefind --site ${{ env.outdir }}
- name: Deploy to GitHub Pages
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.outdir }}