-
Notifications
You must be signed in to change notification settings - Fork 126
48 lines (44 loc) · 1.54 KB
/
cloud-admin.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
name: Build and Deploy Cloud Admin to Netlify
on:
push:
tags:
- "*"
branches:
- "main"
paths:
- ".github/workflows/cloud-admin.yml"
- "web-admin/**"
- "web-common/**"
workflow_dispatch:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ fromJSON('["e73ac785-882e-425a-8fc8-5432528bb374","afb26917-7a60-47d9-81dc-c0babbb0d9a9"]')[ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') ] }}
DOMAIN: ${{ fromJSON('["rilldata.io","rilldata.com"]')[ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') ] }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16
- name: Build Cloud Admin
run: |-
npm install
npm run build -w web-admin
env:
VITE_RILL_ADMIN_URL: https://admin.${{ env.DOMAIN }}
- name: Deploy cloud-admin to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: ./web-admin/build
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Cloud-admin ${{ github.ref_name }} deployed to ui.${{ env.DOMAIN }}"
production-deploy: true
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
netlify-config-path: ./netlify.toml
timeout-minutes: 1