Merge pull request #13 from russelldb/deploy #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .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 | |
with: | |
submodules: recursive # Fetch all submodules recursively | |
- name: Install Zola | |
run: | | |
curl -sSf https://github.com/getzola/zola/releases/download/v0.19.2/zola-v0.19.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 |