feat: billboard target entity test scene + scene emotes test scene update #72
Workflow file for this run
This file contains hidden or 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
| name: Deploy changed scenes to world | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| scene: | |
| description: 'Scene folder to deploy (e.g. scenes/88,-10-audio-visualization)' | |
| type: string | |
| required: true | |
| env: | |
| DCL_PRIVATE_KEY: ${{ secrets.DCL_PRIVATE_KEY }} | |
| jobs: | |
| detect-changes: | |
| name: Detect changed scenes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| scenes: ${{ steps.changes.outputs.scenes }} | |
| has_scenes: ${{ steps.changes.outputs.has_scenes }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Find changed scenes | |
| id: changes | |
| run: | | |
| if [ -n "${{ inputs.scene }}" ]; then | |
| echo "Manual deploy for: ${{ inputs.scene }}" | |
| CANDIDATES="${{ inputs.scene }}" | |
| else | |
| CANDIDATES=$(git diff --name-only HEAD~1 HEAD | grep '^scenes/' | cut -d'/' -f1-2 | sort -u) | |
| fi | |
| JSON="[]" | |
| for dir in $CANDIDATES; do | |
| if [ -f "$dir/scene.json" ]; then | |
| JSON=$(echo "$JSON" | jq -c --arg d "$dir" '. + [$d]') | |
| fi | |
| done | |
| echo "scenes=$JSON" >> "$GITHUB_OUTPUT" | |
| echo "has_scenes=$( [ "$JSON" != "[]" ] && echo true || echo false )" >> "$GITHUB_OUTPUT" | |
| echo "Scenes to deploy: $JSON" | |
| deploy: | |
| name: Deploy ${{ matrix.scene }} | |
| needs: detect-changes | |
| if: needs.detect-changes.outputs.has_scenes == 'true' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| scene: ${{ fromJson(needs.detect-changes.outputs.scenes) }} | |
| fail-fast: false | |
| defaults: | |
| run: | |
| working-directory: ./${{ matrix.scene }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install npm packages | |
| run: npm install | |
| - name: Build scene | |
| run: npm run build | |
| - name: Deploy scene | |
| run: npm run deploy -- --target-content=https://worlds-content-server.decentraland.zone --multi-scene | |
| pr-comment: | |
| name: Post PR test instructions | |
| needs: detect-changes | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' && needs.detect-changes.outputs.has_scenes == 'true' | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Extract coords from first changed scene | |
| id: coords | |
| run: | | |
| FIRST=$(echo '${{ needs.detect-changes.outputs.scenes }}' | jq -r '.[0]') | |
| COORDS=$(echo "$FIRST" | sed -E 's|^scenes/(-?[0-9]+,-?[0-9]+).*|\1|') | |
| echo "coords=$COORDS" >> "$GITHUB_OUTPUT" | |
| - name: Find existing comment | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: 'github-actions[bot]' | |
| body-includes: How to test scene changes | |
| - name: Create or update comment | |
| uses: peter-evans/create-or-update-comment@v3 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| ## How to test scene changes in the SEPOLIA World | |
| Every commit pushed to any branch automatically triggers the deployment of the modified scenes to the `sdk7testscenes.dcl.eth` world on SEPOLIA. | |
| If you need to re-trigger that deployment manually: | |
| 1. Go to the [Deploy changed scenes to world](https://github.com/decentraland/sdk7-test-scenes/actions/workflows/deploy-worlds.yml) action | |
| 2. Click **Run workflow**, select your branch, and enter the scene folder (e.g. `scenes/88,-10-audio-visualization`) | |
| Once deployed, test the scene in the Explorer: | |
| 1. Switch MetaMask to the **SEPOLIA** network (not mainnet) | |
| 2. Open the Explorer using one of these methods: | |
| - **Deep link** (any browser): `decentraland://?dclenv=zone&realm=sdk7testscenes.dcl.eth&position=${{ steps.coords.outputs.coords }}` | |
| - **Custom build**: launch with `--dclenv zone --position ${{ steps.coords.outputs.coords }}` app params — [instructions](https://github.com/decentraland/unity-explorer/blob/main/docs/how-to-connect-to-a-local-scene.md#connecting-a-custom-build-to-the-scene) | |
| - **Unity Editor**: set _Decentraland Environment_ to `zone` and _Init Realm_ to `sdk7testscenes.dcl.eth` | |
| edit-mode: replace |