Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check zola build on pull requests #438

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/zola.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
branches:
- gh-pages
pull_request:

jobs:
deploy:
runs-on: ubuntu-20.04
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -19,6 +20,25 @@ jobs:
- name: Build
run: "export CURRENT_TIME=$(date '+%d %B %Y'); ./zola build"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: ${{ github.ref == 'refs/heads/gh-pages' }}
with:
name: build_artifacts
path: public/

deploy:
if: ${{ github.ref == 'refs/heads/gh-pages' }}

needs: build

runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build_artifacts

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down