mirror of
https://github.com/Dichgrem/Blog.git
synced 2025-12-16 13:32:00 -05:00
feat:zola_actions
This commit is contained in:
41
.github/workflows/build.yml
vendored
Normal file
41
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user