fix: Outdated path crates/rome_playground -> website/playground
* 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
MODIFY
.github/workflows/deploy_playground.yml
.github/workflows/deploy_playground.yml
@@ -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/wasm-pack-action@v0.3.0
- - 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 }}

MODIFY
.github/workflows/deploy_playground_on_main.yml
.github/workflows/deploy_playground_on_main.yml
@@ -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/wasm-pack-action@v0.3.0
- - 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

fix: Outdated path crates/rome_playground -> website/playground (#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