Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always run the build step of the publish workflow, but only deploy on…
Browse files Browse the repository at this point in the history
… main branch
ThisIsMissEm committed Jan 24, 2025

Verified

This commit was signed with the committer’s verified signature.
ThisIsMissEm Emelia Smith
1 parent bf37632 commit 0f301ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@ name: Deploy Hugo site to Pages

on:
push:
branches:
- main
workflow_dispatch:

permissions:
@@ -45,10 +43,13 @@ jobs:
run: make -C community.hachyderm.io hugo
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
path: community.hachyderm.io/public/

# Only run deploy on main branch, all others just run the build as a CI step.
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

0 comments on commit 0f301ef

Please sign in to comment.