Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ jobs:
# No repository checkout or build code runs with deployment permissions.
- name: Reject an obsolete main revision
id: current
timeout-minutes: 1
env:
EXPECTED_SHA: ${{ github.sha }}
GIT_TERMINAL_PROMPT: '0'
shell: bash
run: |
current_sha="$(curl --fail --silent --show-error --retry 3 --max-time 30 https://api.github.com/repos/sieblyio/docs/commits/main | jq -er '.sha')"
current_sha="$(git ls-remote --exit-code https://github.com/sieblyio/docs.git refs/heads/main | cut -f1)"
if [ "$current_sha" = "$EXPECTED_SHA" ]; then
echo 'deploy=true' >> "$GITHUB_OUTPUT"
else
Expand Down
Loading