Skip to content

Commit

Permalink
Add URL to auto-generated hugo page as comment to the commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Staacks committed Dec 24, 2024
1 parent 8c9393a commit c5bcec0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/conditional_convert_via_pandoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
if: needs.condition_check_files.outputs.bool_files_changed == 'true'
env:
list_changed_files: ${{ needs.condition_check_files.outputs.list_changed_files }}
COMMIT: ""
steps:
- uses: actions/checkout@v4 # In order to find the script pandoc.sh
with:
Expand All @@ -67,11 +68,16 @@ jobs:
git config --local user.name "GH_Action_Bot"
git add ./content
git commit -m "GH Action: Pandoc | New output for changed files"
COMMIT=$(git rev-parse HEAD)
export COMMIT=$(git rev-parse HEAD)
git push -f origin ${GITHUB_REF##*/}
curl https://phyphox.org/expdb/pandocdone.php?commit=$COMMIT &> /dev/null
# - name: Save artifacts # Instead of 'Commit files'. Saves the files as .zip
# uses: actions/upload-artifact@v4
# with:
# name: pandoc-artifact
# path: content/
- name: Add URL as comment
uses: peter-evans/commit-comment@v3
with:
body: Hugo output should be available at https://phyphox.org/expdb/$COMMIT/public

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
translationKey: "Inelastic Collision Instruction"
title: "(In)elastischer Stoß"
date: 2024-12-17T11:42:40+01:00
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
translationKey: "Inelastic Collision Instruction"
title: "(In)elastic Collision"
date: 2024-12-17T11:42:40+01:00
Expand Down

1 comment on commit c5bcec0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hugo output should be available at https://phyphox.org/expdb/$COMMIT/public

Please sign in to comment.