-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (40 loc) · 1.16 KB
/
deploy-webapp.yaml
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
name: Deploy webapp
on:
push:
branches: [main]
permissions:
contents: read
deployments: write
id-token: write
# Prevent two versions of the webapp from being deployed in parallel.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.5.0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --filter webapp...
- name: Build webapp
run: pnpm build --filter webapp...
env:
VITE_COMMIT_SHA: ${{ github.sha }}
VITE_GITHUB_URLS: https://api.github.com
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
accountId: 1f74b8302712fd67d5eddea8c96eb776
projectName: mergeable
workingDirectory: apps/webapp
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}