Publish to production environment #9
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: Publish to production environment | |
| on: | |
| push: | |
| branches: [production] | |
| paths: | |
| - "src/**" | |
| - "pesde.toml" | |
| - "default.project.json" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| environment: Production | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4.1.7 | |
| - name: Setup pesde | |
| uses: ernisto/setup-pesde@5f9a3399d5ae0fe78b014f5f13cd913f27755fb4 | |
| - name: Install dependencies | |
| run: pesde install | |
| - name: Build Rojo project | |
| run: rojo build -o build.rbxm | |
| - name: Upload project | |
| uses: actions/upload-artifact@v4.4.0 | |
| with: | |
| name: build.rbxm | |
| path: build.rbxm | |
| deploy: | |
| name: Deploy | |
| environment: Production | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| steps: | |
| - name: Download project | |
| uses: actions/download-artifact@v4.1.8 | |
| with: | |
| name: build.rbxm | |
| - name: Update Roblox asset | |
| env: | |
| ROBLOX_API_KEY: ${{ secrets.ROBLOX_API_KEY }} | |
| ROBLOX_ASSET_ID: ${{ vars.ROBLOX_ASSET_ID }} | |
| run: | | |
| curl \ | |
| --fail-with-body \ | |
| --request PATCH \ | |
| "https://apis.roblox.com/assets/v1/assets/""$ROBLOX_ASSET_ID""" \ | |
| --header "x-api-key: $ROBLOX_API_KEY" \ | |
| --form 'fileContent="@build.rbxm"' | |