Update theme #61
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: Deploy | |
on: | |
push: | |
paths: ["content/**", "static/**", "langs/**", "templates/**", "config.toml"] | |
branches: [main] | |
pull_request: | |
paths: ["content/**", "static/**", "langs/**", "templates/**", "config.toml"] | |
workflow_dispatch: | |
env: | |
# Build directory where the website will run its build. Use the dot (period) to use current. | |
builddir: . | |
# 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 | |
uses: taiki-e/install-action@zola | |
- name: Install Python Requirements | |
run: pip install pagefind[extended] | |
- name: Build | |
run: zola -r "${{ env.builddir }}" build | |
# Ignore below name if you do not use pagefind. | |
- name: Generate Pagefind Search | |
run: python -m pagefind --site ${{ env.outdir }} | |
- name: Deploy Site | |
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 }} |