Repository navigation
[1.x] Major dependencies update #1
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 approved pull requests and latest commit to pkg.pr.new | |
| on: | |
| pull_request: | |
| branches: | |
| - '2.0' | |
| - 'main' | |
| jobs: | |
| publish: | |
| if: github.repository == 'processing/p5.js-website' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.22.x | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build website | |
| run: npm run build | |
| - name: Publish preview | |
| id: deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: versions upload | |
| - name: Include PR info in output file | |
| uses: actions/github-script@v8 | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }} | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const data = { | |
| workflow: { | |
| pull_request: process.env.PR_NUMBER ? { | |
| number: process.env.PR_NUMBER | |
| } : null | |
| }, | |
| deployment_url: process.env.DEPLOYMENT_URL | |
| }; | |
| fs.writeFileSync("output.json", JSON.stringify(data)); | |
| - name: Upload output data | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: output.zip | |
| path: output.json |