|
37 | 37 | - ".github/workflows/web.yml" |
38 | 38 |
|
39 | 39 | build: |
40 | | - name: Build |
| 40 | + name: Build & Check |
| 41 | + needs: [changes] |
| 42 | + if: needs.changes.outputs.web == 'true' |
41 | 43 | runs-on: ubuntu-latest |
42 | 44 | timeout-minutes: 30 |
43 | 45 | steps: |
|
55 | 57 | cache: "npm" |
56 | 58 | cache-dependency-path: vortex-web/package-lock.json |
57 | 59 | - run: npm ci |
58 | | - - run: npm run build |
| 60 | + - run: npm run wasm |
59 | 61 | - run: npm run lint |
60 | | - - uses: actions/upload-artifact@v4 |
61 | | - with: |
62 | | - name: vortex-web-dist |
63 | | - path: vortex-web/dist |
64 | | - retention-days: 7 |
65 | | - |
66 | | - preview: |
67 | | - name: Deploy Preview |
68 | | - needs: [build, changes] |
69 | | - if: needs.changes.outputs.web == 'true' |
70 | | - runs-on: ubuntu-latest |
71 | | - timeout-minutes: 10 |
72 | | - permissions: |
73 | | - contents: read |
74 | | - pull-requests: write |
75 | | - deployments: write |
76 | | - environment: |
77 | | - name: preview |
78 | | - url: ${{ steps.deploy.outputs.deployment-url }} |
79 | | - steps: |
80 | | - - uses: actions/download-artifact@v4 |
81 | | - with: |
82 | | - name: vortex-web-dist |
83 | | - path: dist |
84 | | - - name: Deploy to Cloudflare Pages |
85 | | - id: deploy |
86 | | - uses: cloudflare/wrangler-action@v3 |
87 | | - with: |
88 | | - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
89 | | - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |
90 | | - command: >- |
91 | | - pages deploy dist/ |
92 | | - --project-name=vortex-web |
93 | | - --branch=${{ github.head_ref || github.ref_name }} |
94 | | - - name: Comment preview URL on PR |
95 | | - if: github.event_name == 'pull_request' |
96 | | - uses: actions/github-script@v7 |
97 | | - with: |
98 | | - script: | |
99 | | - const body = `**Vortex Web Preview:** ${{ steps.deploy.outputs.deployment-url }}`; |
100 | | - const { data: comments } = await github.rest.issues.listComments({ |
101 | | - owner: context.repo.owner, |
102 | | - repo: context.repo.repo, |
103 | | - issue_number: context.issue.number, |
104 | | - }); |
105 | | - const existing = comments.find(c => |
106 | | - c.body?.startsWith('**Vortex Web Preview:**') |
107 | | - ); |
108 | | - if (existing) { |
109 | | - await github.rest.issues.updateComment({ |
110 | | - owner: context.repo.owner, |
111 | | - repo: context.repo.repo, |
112 | | - comment_id: existing.id, |
113 | | - body, |
114 | | - }); |
115 | | - } else { |
116 | | - await github.rest.issues.createComment({ |
117 | | - owner: context.repo.owner, |
118 | | - repo: context.repo.repo, |
119 | | - issue_number: context.issue.number, |
120 | | - body, |
121 | | - }); |
122 | | - } |
| 62 | + - run: npm run typecheck |
| 63 | + - run: npm run build-storybook |
0 commit comments