Skip to content

Commit

Permalink
ci: hopefully fix workflow once more
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Zeuch <[email protected]>
  • Loading branch information
l-zeuch committed Dec 22, 2023
1 parent 0e89e88 commit 20f5f24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: Deploy Hugo site to GH Pages
on:
# Only deploy when it is accepted for production
push:
branches:
- master
pull_request:
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -35,7 +34,7 @@ jobs:
- name: Cache Hugo modules
uses: actions/cache@v3
with:
path: /home/runner/.cache/hugo_cache
path: ~/.cache/hugo_cache/
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
Expand All @@ -55,6 +54,8 @@ jobs:
path: ./public

deploy:
# Only deploy if it's actually on main branch
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
needs: build
environment:
name: github-pages
Expand Down

0 comments on commit 20f5f24

Please sign in to comment.