Skip to content

Commit aea205b

Browse files
committed
Merge branch 'fix/level' of https://github.com/vr-varad/exoscale-academy into fix/level
2 parents 8a83fc8 + 9a6b03e commit aea205b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/static.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,16 @@ permissions:
1414
contents: read
1515
pages: write
1616
id-token: write
17-
18-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
2018
concurrency:
21-
group: "pages"
22-
cancel-in-progress: false
19+
group: "pages-${{ github.event.pull_request.number || github.run_id }}"
20+
cancel-in-progress: true
2321

2422
jobs:
2523
# Single deploy job since we're just deploying
2624
deploy:
2725
environment:
28-
name: github-pages
26+
name: pr-preview-${{ github.event.pull_request.number || github.run_id }}
2927
url: ${{ steps.deployment.outputs.page_url }}
3028
runs-on: ubuntu-latest
3129
steps:
@@ -45,8 +43,15 @@ jobs:
4543
- name: Upload artifact
4644
uses: actions/upload-pages-artifact@v3
4745
with:
48-
# Upload entire repository
46+
# Upload just the public folder
4947
path: 'public'
5048
- name: Deploy to GitHub Pages
5149
id: deployment
5250
uses: actions/deploy-pages@v4
51+
- name: Comment Preview URL on PR
52+
if: github.event_name == 'pull_request'
53+
uses: marocchino/sticky-pull-request-comment@v2
54+
with:
55+
token: ${{ secrets.GH_ACCESS_TOKEN }}
56+
message: |
57+
🚀 Preview: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)