forked from rome/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Outdated path crates/rome_playground -> website/playground (rome…
…#2377) * fix: Outdated path crates/rome_playground -> website/playground * fix: Removed path condition for deploy_playground.yml. We want to build even if playground repo isn't changed * fix: re-added paths but with crates this time * fix: Removed unnecessary wasm-pack command. Also trying to fix url creation
- Loading branch information
Nicholas Yang
authored
Apr 8, 2022
1 parent
ab80eea
commit 73452bd
Showing
2 changed files
with
13 additions
and
7 deletions.
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ on: | |
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- "crates" | ||
- "website/playground" | ||
branches: | ||
- main | ||
|
@@ -23,7 +24,6 @@ jobs: | |
node-version: '14' | ||
- run: npm install --prefix website/playground | ||
- uses: jetli/[email protected] | ||
- run: wasm-pack build website/playground --target web --release | ||
- run: npm run build --prefix website/playground -- --base=/$GITHUB_SHA/ | ||
- name: Publish | ||
uses: jakejarvis/s3-sync-action@master | ||
|
@@ -34,6 +34,13 @@ jobs: | |
SOURCE_DIR: 'website/playground/dist' # optional: defaults to entire repository | ||
DEST_DIR: $GITHUB_SHA | ||
|
||
- name: Set Playground URL | ||
if: github.event_name == "pull_request" | ||
id: url | ||
run: | | ||
url="[Playground for commit](http://play.rome.tools.s3-website-us-east-1.amazonaws.com/${{ GITHUB_SHA }}/index.html)" | ||
echo "::set-output name=url::$url" | ||
- name: Get the PR number | ||
if: github.event_name == 'pull_request' | ||
id: pr-number | ||
|
@@ -54,7 +61,7 @@ jobs: | |
with: | ||
comment-id: ${{ steps.previous-comment.outputs.comment-id }} | ||
body: | | ||
[Playground link](http://play.rome.tools.s3-website-us-east-1.amazonaws.com/$GITHUB_SHA/index.html) | ||
${{ steps.url.outputs.url }} | ||
edit-mode: replace | ||
|
||
- name: Write a new comment | ||
|
@@ -64,6 +71,6 @@ jobs: | |
with: | ||
issue-number: ${{ steps.pr-number.outputs.pr }} | ||
body: | | ||
[Playground link](http://play.rome.tools.s3-website-us-east-1.amazonaws.com/$GITHUB_SHA/index.html) | ||
${{ steps.url.outputs.url }} | ||
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 |
---|---|---|
|
@@ -20,15 +20,14 @@ jobs: | |
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- run: npm install --prefix crates/rome_playground | ||
- run: npm install --prefix website/playground | ||
- uses: jetli/[email protected] | ||
- run: wasm-pack build crates/rome_playground --target web --release | ||
- run: npm run build --prefix crates/rome_playground | ||
- run: npm run build --prefix website/playground | ||
- name: Publish | ||
uses: jakejarvis/s3-sync-action@master | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
SOURCE_DIR: 'crates/rome_playground/dist' # optional: defaults to entire repository | ||
SOURCE_DIR: 'website/playground/dist' # optional: defaults to entire repository | ||
|