Skip to content

Commit

Permalink
Merge pull request #11 from russelldb/deploy
Browse files Browse the repository at this point in the history
Add GitHub Actions workflow to deploy Zola site
  • Loading branch information
russelldb authored Oct 28, 2024
2 parents c41133b + c2e2f03 commit 13bccfd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .github/workflows/deploy.yml
name: Deploy Zola site to GitHub Pages

on:
push:
branches:
- main # Triggers when pushing to main branch

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Install Zola
run: |
curl -sSf https://github.com/getzola/zola/releases/download/v0.19.2/zola-v0.17.2-x86_64-unknown-linux-gnu.tar.gz -L -o zola.tar.gz
tar -xzf zola.tar.gz -C /usr/local/bin
- name: Build the Zola site
run: zola build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages

0 comments on commit 13bccfd

Please sign in to comment.