-
Notifications
You must be signed in to change notification settings - Fork 9
36 lines (36 loc) · 1.13 KB
/
publish-demo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 }}