mirror of
https://github.com/Dichgrem/Blog.git
synced 2025-12-16 05:22:00 -05:00
43 lines
973 B
YAML
43 lines
973 B
YAML
name: Blog CI (Zola)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Zola
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: zola
|
|
|
|
- name: Install Pagefind
|
|
run: |
|
|
wget https://github.com/Pagefind/pagefind/releases/download/v1.4.0/pagefind-v1.4.0-x86_64-unknown-linux-musl.tar.gz
|
|
tar xvf pagefind-v1.4.0-x86_64-unknown-linux-musl.tar.gz
|
|
sudo mv pagefind /usr/local/bin/
|
|
|
|
- name: Build Zola
|
|
run: zola build
|
|
|
|
- name: Build Pagefind
|
|
run: pagefind --site public --root-selector body
|
|
|
|
- name: Push public to dist
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./public
|
|
publish_branch: dist
|
|
force_orphan: true
|
|
|