Skip to content

Commit

Permalink
Check zola build on pull requests (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriantombu authored Jul 23, 2024
1 parent 19235cc commit 4a0af40
Showing 1 changed file with 22 additions and 2 deletions.
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

0 comments on commit 4a0af40

Please sign in to comment.