Skip to content

chore(deps): lock file maintenance #176

chore(deps): lock file maintenance

chore(deps): lock file maintenance #176

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
# path to built site
outputDir: dist
jobs:
preview:
name: Preview
if: (github.ref != 'refs/heads/main')
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm
- run: pnpm build --preset=cloudflare_pages
- name: Deploy preview build to Cloudflare Pages
uses: mathiasvr/[email protected]
id: cloudflare
with:
run: npx wrangler pages deploy --project-name storacha-website-staging --branch "$GITHUB_REF_NAME" --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/[email protected]
id: cloudflare_url
with:
run: egrep -o 'https?://[^ ]+' <(echo "${{ steps.cloudflare.outputs.stdout }}")
- name: Find Current Pull Request
uses: jwalton/[email protected]
id: finder
- name: Update Preview URLs PR Comment
uses: marocchino/[email protected]
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
release:
name: Release
if: (github.event_name == 'push' && github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
environment:
name: production
url: https://storacha.network
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pnpm
- run: pnpm build --preset=cloudflare_pages
- name: Deploy build to Cloudflare Pages
uses: mathiasvr/[email protected]
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/[email protected]
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