Fixed search as searching, objects #63
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 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 }} |