Skip to content

Commit

Permalink
Fix unexpected skipped deployment step (#57)
Browse files Browse the repository at this point in the history
* Add debug

* TO BE REVERTED: Test of deployment

* Fix unexpected skipped step due to misscrafted logic

* Remove debug lines

* Craft the final logic expression and update comments
  • Loading branch information
ctmbl authored May 5, 2024
1 parent 61a664f commit 5b2c6e3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Debug
run: |
echo "github.event.repository.fork = ${{ github.event.repository.fork }}"
echo "github.event_name = ${{ github.event_name }}"
# Checkout repo AND ITS SUBMODULES
- name: 🛒 Checkout
uses: actions/checkout@v3
Expand All @@ -39,7 +44,7 @@ jobs:
path: ./build/blog

# Deployment job: heavily inspired from https://swharden.com/blog/2022-03-20-github-actions-hugo/
# /!\ only triggers on (push events AND non-fork repos) OR manually triggered
# /!\ only triggers on (push events AND NOT fork repos) OR manually triggered
## Required secrets:
# - SSH_KNOWN_HOSTS
# - PRIVATE_SSH_KEY
Expand All @@ -55,7 +60,7 @@ jobs:
# If for any reason you want to trigger this step on your fork remove the following line,
# trigger manually or open an issue https://github.com/iScsc/blog.iscsc.fr/issues,
# we'll find a better way to skip this step.
if: ${{ (github.event_name == 'push' && github.event.repository.fork == 'false') || github.event_name == 'workflow_dispatch' }}
if: ${{ (github.event_name == 'push' && ! github.event.repository.fork) || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: 🛠️ Setup build directory
Expand Down

0 comments on commit 5b2c6e3

Please sign in to comment.