Skip to content

ci: fix pagefind invocation #7

ci: fix pagefind invocation

ci: fix pagefind invocation #7

Workflow file for this run

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v3 # see https://github.com/pnpm/action-setup
with:
version: 8
- name: Setup node.js
uses: actions/setup-node@v4 # see https://github.com/actions/setup-node/
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: ./pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- name: spellcheck
run: |
./node_modules/.bin/cspell \
./README.md \
./**/*.md \
./assets/*.svg \
./assets/critical.css \
./assets/**/*.{ts,js}
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
- name: Build
run: hugo --gc --minify # TODO: cache build?
- run: ls -al public
- name: Pagefind
run: |
./node_modules/.bin/pagefind \
--site ./public \
--root-selector main
- name: Upload artifact
uses: actions/upload-pages-artifact@v3 # This will automatically upload an artifact from the '/_site' directory
with:
path: public
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1