Skip to content

Added the ability to toggle the usage of JavaScript #52

Added the ability to toggle the usage of JavaScript

Added the ability to toggle the usage of JavaScript #52

Workflow file for this run

name: Deploy
on:
push:
paths: ["archetypes/**", "data/**", "demo/**", "i18n/**", "layouts/**", "static/**", "hugo.yaml"]
branches: [main]
pull_request:
paths: ["archetypes/**", "data/**", "demo/**", "i18n/**", "layouts/**", "static/**", "hugo.yaml"]
workflow_dispatch:
env:
HUGO_VERSION: 0.140.2
# Build directory where the website will run its build. Use the dot (period) to use current.
builddir: demo
# Output directory where built files will deploy. This also will be used on Pagefind search generation.
outdir: demo/HTML
# Default to bash
defaults:
run:
shell: bash
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Python Requirements
run: pip install pagefind[extended]
- name: Build
run: |
cd ${{ env.builddir }}
hugo \
# 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 }}