Skip to content

Commit

Permalink
Add PR preview deployments to web workflow (#3395)
Browse files Browse the repository at this point in the history
  • Loading branch information
riverar authored Dec 14, 2024
1 parent 17b1640 commit c1881bc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,22 @@ jobs:
run: npm run build
working-directory: web/features

- name: Stage website
- name: Stage website (production)
run: |
mkdir -p web/build/features
cp -r web/features/build/* web/build/features
if: github.event_name != 'pull_request'

- name: Stage website (preview)
run: |
mkdir -p web/build/preview/${{ github.event.pull_request.number }}/features
cp -r web/features/build/* web/build/preview/${{ github.event.pull_request.number }}/features
if: github.event_name == 'pull_request'

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: web/build
if: github.event_name != 'pull_request'

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
if: github.event_name != 'pull_request'

0 comments on commit c1881bc

Please sign in to comment.