-
Notifications
You must be signed in to change notification settings - Fork 9
67 lines (67 loc) · 1.92 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish Demo
env:
CI: true
FORCE_COLOR: 1
on: [push]
jobs:
publish:
runs-on: ubuntu-latest
if: github.ref_name == 'master'
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- run: pnpm -r --filter demo run build
env:
GITHUB_WORKFLOW_ID: ${{ github.run_id }}
- uses: fission-suite/[email protected]
id: fission
with:
machine_key: ${{ secrets.FISSION_MACHINE_KEY }}
workdir: 'examples/demo'
- name: Add url to GITHUB_STEP_SUMMARY
run: |
echo "
### App URL 🌐
https://dweb.link/ipfs/${{ steps.fission.outputs.app_cid }}
" >> $GITHUB_STEP_SUMMARY
preview:
runs-on: ubuntu-latest
if: github.ref_name != 'master' && github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- run: pnpm -r --filter demo run build
env:
GITHUB_WORKFLOW_ID: ${{ github.run_id }}
- name: Add report to web3.storage
uses: web3-storage/add-to-web3@v2
id: add_to_web3_storage
with:
path_to_add: examples/demo/dist
web3_token: ${{ secrets.WEB3_TOKEN }}
- name: Add url to GITHUB_STEP_SUMMARY
run: |
echo "
### Preview URL 🌐
${{ steps.add_to_web3_storage.outputs.url }}
" >> $GITHUB_STEP_SUMMARY
- uses: mshick/add-pr-comment@v2
with:
message-id: 'preview-url'
message: |
### Preview URL 🌐
${{ steps.add_to_web3_storage.outputs.url }}