-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (52 loc) · 1.52 KB
/
deploy-portal-dashboard.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
name: Deploy Portal Dashboard
on:
push:
branches:
- '**'
paths:
- 'apps/portal-dashboard/**'
pull_request:
branches:
- '**'
paths:
- 'apps/portal-dashboard/**'
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
pull-requests: write
deployments: write
contents: read
jobs:
build:
name: Deploy Portal Dashboard
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup-all
with:
node_version: 20.10.0
go_version: 1.23.0
- name: Make envfile
uses: SpicyPizza/create-envfile@v2.0
with:
envkey_VITE_PORTAL_DOMAIN: ${{ vars.TESTING_PORTAL_DOMAIN }}
envkey_NODE_ENV: development
directory: apps/portal-dashboard
- name: Build
run: pnpm build:portal-dashboard
- name: Publish to Cloudflare Pages
id: deploy_cf
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: lume-web-portal-dashboard-staging
directory: apps/portal-dashboard/build/client
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: mshick/add-pr-comment@v2
if: github.event_name == 'pull_request'
with:
message: |
The Portal Dashboard has been deployed to [Staging](${{ steps.deploy_cf.outputs.url }}).