-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployment previews for forks (#2207)
* Create deploy_preview_forks.yml * skip original deployment on forks * add comment to explain the conditional
- Loading branch information
1 parent
428930d
commit 4486aa6
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Deploy (fork) | ||
on: | ||
pull_request_target: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
deploy-preview: | ||
if: ${{ github.repository == 'primer/react' }} # target repository for pull_request | ||
name: Preview | ||
uses: primer/.github/.github/workflows/deploy_preview.yml@main | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
with: | ||
node_version: 14 | ||
install: npm ci && cd docs && npm ci && cd .. | ||
build: npm run build:docs:preview | ||
output_dir: docs/public |