chore(deps): update dependency @nuxt/devtools to v2 [security] #1128
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| # path to built site | |
| outputDir: dist | |
| jobs: | |
| preview: | |
| name: Preview | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| environment: | |
| name: ${{ (github.ref_name == 'main') && 'staging' || format('preview-{0}', github.ref_name) }} | |
| url: ${{ (github.ref_name == 'main') && 'https://staging.storacha.network/' || steps.cloudflare_url.outputs.stdout }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/pnpm | |
| - name: Build site | |
| run: pnpm build --preset=cloudflare-pages | |
| env: | |
| CI: true | |
| NODE_ENV: production | |
| - name: Deploy preview build to Cloudflare Pages | |
| uses: mathiasvr/command-output@v2.0.0 | |
| id: cloudflare | |
| with: | |
| run: npx wrangler pages deploy --project-name "$CLOUDFLARE_PAGES_PROJECT_NAME" --branch "$GITHUB_REF_NAME" --commit-hash "$GITHUB_SHA" ${{ env.outputDir }} | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | |
| CLOUDFLARE_PAGES_PROJECT_NAME: ${{ (github.ref_name == 'main') && 'storacha-website-staging' || 'storacha-website-preview' }} | |
| - name: Find Cloudflare Pages preview URL | |
| uses: mathiasvr/command-output@v2.0.0 | |
| id: cloudflare_url | |
| with: | |
| run: egrep -o 'https?://[^ ]+' <(echo "${{ steps.cloudflare.outputs.stdout }}") | |
| - name: Find Current Pull Request | |
| uses: jwalton/gh-find-current-pr@v1.3.3 | |
| id: finder | |
| - name: Update Preview URLs PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2.9.0 | |
| with: | |
| number: ${{ steps.finder.outputs.pr }} | |
| message: | | |
| ### Website preview πβ¨ | |
| - β οΈ ${{ steps.cloudflare_url.outputs.stdout }} | |
| [build log](/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
| - name: Add Preview URLs as Job Summary | |
| run: | | |
| echo " | |
| ### Website preview πβ¨ | |
| - β οΈ ${{ steps.cloudflare_url.outputs.stdout }} | |
| " >> $GITHUB_STEP_SUMMARY | |
| changelog: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| name: Changelog | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| outputs: | |
| releases_created: ${{ steps.tag-release.outputs.releases_created }} | |
| steps: | |
| - uses: GoogleCloudPlatform/release-please-action@v3 | |
| id: tag-release | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| release-type: node | |
| changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Other Changes","hidden":false}]' | |
| release: | |
| name: Release | |
| if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created) || inputs.force_release | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: production | |
| url: https://storacha.network | |
| needs: | |
| - changelog | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/pnpm | |
| - name: Build site | |
| run: pnpm build --preset=cloudflare-pages | |
| env: | |
| CI: true | |
| NODE_ENV: production | |
| - name: Deploy build to Cloudflare Pages | |
| uses: mathiasvr/command-output@v2.0.0 | |
| id: cloudflare | |
| with: | |
| run: npx wrangler pages deploy --project-name storacha-website --branch "main" --commit-hash "$GITHUB_SHA" ${{ env.outputDir }} | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | |
| - name: Find Cloudflare Pages preview URL | |
| uses: mathiasvr/command-output@v2.0.0 | |
| id: cloudflare_url | |
| with: | |
| run: egrep -o 'https?://[^ ]+' <(echo "${{ steps.cloudflare.outputs.stdout }}") | |
| - name: Add URLs as Job Summary | |
| run: | | |
| echo " | |
| ### Deployed | |
| πΆοΈ https://storacha.network | |
| ### Snapshot URLs πβ¨ | |
| - β οΈ ${{ steps.cloudflare_url.outputs.stdout }} | |
| " >> $GITHUB_STEP_SUMMARY |