-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A GitHub action creates a preview for each pull request by deploying the build project on GitHub Pages
- Loading branch information
Tamás Russ
authored
Jul 5, 2024
1 parent
072c916
commit fede42b
Showing
2 changed files
with
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Deploy PR previews | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
paths: | ||
- "packages/openscd/**" | ||
|
||
concurrency: preview-${{ github.ref }} | ||
|
||
jobs: | ||
deploy-preview: | ||
permissions: write-all | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and Build OpenSCD | ||
if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed | ||
run: | | ||
npm i @nx/nx-linux-x64-gnu | ||
npm clean-install | ||
npm run-script build | ||
- name: Deploy preview | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
source-dir: packages/openscd/dist |
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