Skip to content

Fix deploy preview workflow #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
24 changes: 7 additions & 17 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
cancel-in-progress: true

permissions:
contents: read
contents: write
pages: write
id-token: write
pull-requests: write
Expand Down Expand Up @@ -58,25 +58,15 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download Preview Artifact
uses: actions/download-artifact@v4
with:
name: preview-site-${{ github.event.pull_request.number }}
path: ./site

- name: Setup Pages
uses: actions/configure-pages@v4
path: ./build/site

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy PR preview
uses: rossjrw/pr-preview-action@v1
with:
path: ./site

- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4

- name: Delete deployment environment and comment
run: |
node .github/scripts/comment-preview.js
source-dir: ./build/site/
preview-branch: main
Loading