Publish Demo #369
This file contains 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 Demo | |
env: | |
CI: true | |
FORCE_COLOR: 1 | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: github.ref_name == 'master' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
- run: pnpm install | |
- run: pnpm -r --filter demo run build | |
env: | |
GITHUB_WORKFLOW_ID: ${{ github.run_id }} | |
- uses: hugomrdias/action-ipfs-publish@main | |
with: | |
dir: examples/demo/dist | |
w3s-key: ${{ secrets.W3S_KEY }} | |
w3s-proof: ${{ secrets.W3S_PROOF }} | |
cf-token: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
cf-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }} | |
cf-zone-name: ${{ secrets.CLOUDFLARE_ZONE_NAME }} | |
- name: Deploy to Cloudflare Pages | |
run: pnpx wrangler pages deploy examples/demo/dist --project-name filsnap --branch main | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |