Skip to content

Commit 5b80351

Browse files
committed
Previews
1 parent 510aed1 commit 5b80351

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ jobs:
6969
});
7070
7171
publish:
72-
if: github.ref == 'refs/heads/main'
7372
needs: build
7473
runs-on: ubuntu-latest
7574
environment:
76-
name: github-pages
75+
name: ${{ github.event_name == 'pull_request' && format('preview-pr-{0}', github.event.pull_request.number) || 'github-pages' }}
7776
url: ${{ steps.deployment.outputs.page_url }}
7877
steps:
7978
- name: Setup Pages
@@ -82,3 +81,5 @@ jobs:
8281
- name: Deploy to GitHub Pages
8382
id: deployment
8483
uses: actions/deploy-pages@v4
84+
with:
85+
preview: ${{ github.event_name == 'pull_request' }}

0 commit comments

Comments
 (0)