Skip to content

Commit 51e32b0

Browse files
authored
Merge pull request #734 from maxmind/greg/fix-pages-mise-lock
Fix gh-pages deploy: restore java lock URLs and build docs on PRs
2 parents 914767e + 2ced449 commit 51e32b0

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/pages.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: ["main"]
6+
pull_request:
67
workflow_dispatch:
78

89
permissions: {}
910

1011
concurrency:
11-
group: pages
12+
group: pages-${{ github.ref }}
1213
cancel-in-progress: true
1314

1415
jobs:
@@ -31,7 +32,11 @@ jobs:
3132
HUGO_BASEURL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
3233
run: mise run build-docs
3334

35+
# Only publish from pushes to main. On pull requests the steps above
36+
# still run (building the docs and exercising `mise install --locked`),
37+
# so a broken lockfile or docs build is caught before merge.
3438
- name: Push rendered site to gh-pages
39+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
3540
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
3641
with:
3742
github_token: ${{ secrets.GITHUB_TOKEN }}

mise.lock

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)