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
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,31 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: false
needs: [build-api-reference, send-coverage, lint, bff-integration-tests]
steps:
- name: Check no newer commit on the branch will publish
id: newest
env:
GH_TOKEN: ${{ github.token }}
Comment thread
Tonours marked this conversation as resolved.
Resolved
REPO: ${{ github.repository }}
BRANCH: ${{ github.ref_name }}
SHA: ${{ github.sha }}
run: |
NEWER_BUILDS=$(gh api "repos/$REPO/compare/$SHA...$BRANCH" \
--jq '[.commits[].commit.message | select(test("\\[(skip ci|ci skip|no ci|skip actions|actions skip)\\]"; "i") | not)] | length')
if [ "$NEWER_BUILDS" = "0" ]; then
echo "publish=true" >> "$GITHUB_OUTPUT"
else
echo "publish=false" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping the Pages deploy: $NEWER_BUILDS newer commit(s) on $BRANCH start their own run, which publishes the newer reference."
fi
- name: Setup Pages
if: steps.newest.outputs.publish == 'true'
uses: actions/configure-pages@v3
- name: Deploy to GitHub Pages
id: deployment
if: steps.newest.outputs.publish == 'true'
uses: actions/deploy-pages@v4
Loading