Skip to content

Commit

Permalink
[ci] patch previews (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally authored Aug 1, 2024
1 parent 9cd78ab commit e4a4201
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
name: Deploy PR previews

on:
pull_request_target:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
Expand All @@ -25,6 +26,8 @@ jobs:
# this has to match docusaurus's baseURL in docusaurus.config.js
- run: echo "GH_ACTION_DOCUSAURUS_BASE_URL=pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"

- name: Echo
run: echo preview-${{ github.ref }}
- name: Install and Build
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed
run: |
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: Test deployment
on:
push:
branches: ["*"]
pull_request:
types:
- opened
- synchronize
branches:
- "main**"
# note: not testing on PR, since we are already previews for PRs
# which have the same effect
# pull_request:
# types:
# - opened
# - synchronize
# branches:
# - "main**"

jobs:
test-deploy:
Expand Down

0 comments on commit e4a4201

Please sign in to comment.