Skip to content

Commit bd30ada

Browse files
authored
Merge pull request #590 from HarperDB/STUDIO-370_update-workflows
[STUDIO-370] Update workflows for the new branch names
2 parents 0871220 + c421a51 commit bd30ada

File tree

8 files changed

+48
-19
lines changed

8 files changed

+48
-19
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VITE_LOCAL_STUDIO=false
22
VITE_PUBLIC_STRIPE_KEY=pk_live_51RBHdWDftYhlYBQ6K6GdEdeKCVp39ZuEUEZUerkbjFFZTGDXCkkKuxERcnRXNm9Y0ihb4ap8nc5XfgM9RBzqrCng00veY9A7wc
3-
VITE_ENV_NAME=production
3+
VITE_ENV_NAME=prod
44
VITE_CENTRAL_MANAGER_API_URL="https://studio.harperfabric.com"
55
VITE_LOCAL_STUDIO_DEV_URL=http://localhost:9925
66
VITE_REO_DEV_CLIENT_ID=6565c3e84c377ad
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VITE_LOCAL_STUDIO=false
22
VITE_PUBLIC_STRIPE_KEY=pk_test_51RBHdeDHkP48ZfZdmWZgigWfBxRrZw9CG9Yg8CzRkx0qWNPbN5p0FeNPPJOLCZeIjGftFTY2CCoPhtQwMOkD88xx00f1kqsf9c
3-
VITE_ENV_NAME=staging
3+
VITE_ENV_NAME=stage
44
VITE_CENTRAL_MANAGER_API_URL="https://stage.studio.harperfabric.com" # URL for Fabric API
55
VITE_LOCAL_STUDIO_DEV_URL=http://localhost:9925
66
VITE_REO_DEV_CLIENT_ID=0
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
name: Deploy Fabric Dev
1+
name: Deploy to Dev
22
on:
33
workflow_dispatch:
4+
push:
5+
branches:
6+
- dev
47
jobs:
58
deployToDev:
69
runs-on: ubuntu-latest
@@ -17,8 +20,8 @@ jobs:
1720
run: pnpm test
1821
- name: Run lint
1922
run: pnpm lint
20-
- name: Build staging
21-
run: pnpm build:staging
23+
- name: Build dev
24+
run: pnpm build:dev
2225
- name: Install HarperDB
2326
run: npm install -g [email protected]
2427
- name: Deploy to dev
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
name: Deploy Fabric Prod
1+
name: Deploy to Prod
22
on:
3-
workflow_dispatch:
3+
push:
4+
branches:
5+
- prod
46
jobs:
57
deployToProd:
68
runs-on: ubuntu-latest
@@ -17,8 +19,8 @@ jobs:
1719
run: pnpm test
1820
- name: Run lint
1921
run: pnpm lint
20-
- name: Build staging
21-
run: pnpm build:staging
22+
- name: Build prod
23+
run: pnpm build:prod
2224
- name: Install HarperDB
2325
run: npm install -g [email protected]
2426
- name: Deploy to prod

.github/workflows/deploy-fabric-stage.yaml renamed to .github/workflows/deploy-stage.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Deploy Fabric Stage
1+
name: Deploy to Stage
22
on:
33
workflow_dispatch:
44
push:
55
branches:
6-
- harper/fabric
6+
- stage
77
jobs:
88
deployToStage:
99
runs-on: ubuntu-latest
@@ -20,11 +20,11 @@ jobs:
2020
run: pnpm test
2121
- name: Run lint
2222
run: pnpm lint
23-
- name: Build staging
24-
run: pnpm build:staging
23+
- name: Build stage
24+
run: pnpm build:stage
2525
- name: Install HarperDB
2626
run: npm install -g [email protected]
27-
- name: Deploy to staging
27+
- name: Deploy to stage
2828
run: |
2929
rm -rf node_modules # Clean up node_modules, harper will install
3030
CLI_TARGET_USERNAME=${{ secrets.CLI_TARGET_USERNAME }} CLI_TARGET_PASSWORD='${{ secrets.HARPERDB_CLI_TARGET_PASSWORD }}' harperdb deploy target='${{ secrets.CLI_DEPLOY_TARGET }}' restart=true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Daily Stage to Prod PR
2+
3+
on:
4+
# Daily at about noon eastern, 9am Pacific
5+
schedule:
6+
- cron: '0 16 * * *'
7+
# Or manually via workflow dispatch.
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
14+
jobs:
15+
openStageToProdPR:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Create Pull Request
20+
uses: peter-evans/create-pull-request@v7
21+
with:
22+
base: 'prod'

.github/workflows/verify-fabric-pr.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Verify Fabric PR
1+
name: Verify PR
22
on:
33
workflow_dispatch:
44
pull_request:
5-
branches: [harper/fabric]
5+
branches: [dev, stage, prod]
66
jobs:
7-
verifyFabricPR:
7+
verifyPR:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout code

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
"dev": "vite",
88
"dev:local": "vite --mode localstudio",
99
"build": "tsc -b && vite build",
10-
"build:staging": "tsc -b && vite build --mode staging",
11-
"build:production": "tsc -b && vite build --mode production",
10+
"build:local": "tsc -b && vite build --mode localstudio",
11+
"build:dev": "tsc -b && vite build --mode dev",
12+
"build:stage": "tsc -b && vite build --mode stage",
13+
"build:prod": "tsc -b && vite build --mode prod",
1214
"update-sdk": "npx -y dotenv-cli -e .env.local -- npm run update-sdk:fetch && npx -y openapi-typescript --root-types --alphabetize --enum ./dist/central-manager.json -o ./src/lib/api.gen.d.ts",
1315
"update-sdk:fetch": "mkdir -p dist && curl --location \"$VITE_CENTRAL_MANAGER_API_URL/openapi\" -u \"$HDB_ADMIN_USERNAME_FOR_OPENAPI:$HDB_ADMIN_PASSWORD_FOR_OPENAPI\" -o ./dist/central-manager.json",
1416
"lint": "eslint .",

0 commit comments

Comments
 (0)