Skip to content

Commit f438e6a

Browse files
committed
Add workflows
1 parent 9dd4a60 commit f438e6a

File tree

5 files changed

+151
-0
lines changed

5 files changed

+151
-0
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Develop
2+
3+
env:
4+
APP_LOCATION: ''
5+
OUTPUT_LOCATION: 'packages/website/build'
6+
7+
on:
8+
push:
9+
branches: [main]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
deploy-dev:
16+
runs-on: ubuntu-latest
17+
name: Deploy to Dev Environment
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
24+
- name: Deploy to Development
25+
uses: Azure/static-web-apps-deploy@v1
26+
with:
27+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_DEV_API_TOKEN }}
28+
repo_token: ${{ secrets.GITHUB_TOKEN }}
29+
output_location: ${{ env.OUTPUT_LOCATION }}
30+
app_location: ${{ env.APP_LOCATION }}
31+
app_build_command: 'pnpm website build'
32+
action: 'upload'
33+
skip_api_build: true
34+
env:
35+
CUSTOM_BUILD_COMMAND: corepack enable && corepack prepare pnpm@10.9.0 --activate && pnpm install --frozen-lockfile && pnpm ui build && pnpm website build
36+
ENABLE_NODE_MONOREPO_BUILD: true
37+
NODE_VERSION: 22
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy Production
2+
3+
env:
4+
APP_LOCATION: ''
5+
OUTPUT_LOCATION: 'packages/website/build'
6+
7+
on:
8+
push:
9+
branches: ['release/*']
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
deploy-production:
16+
runs-on: ubuntu-latest
17+
name: Deploy to Production
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Enable Corepack
31+
run: corepack enable
32+
33+
- name: Install pnpm
34+
run: corepack prepare pnpm@10.9.0 --activate
35+
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Build UI Package
40+
run: pnpm ui build
41+
42+
- name: Build Documentation
43+
run: pnpm website build
44+
45+
- name: Publish NPM Package
46+
run: pnpm publish --access public
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
50+
- name: Deploy Documentation to Production
51+
uses: Azure/static-web-apps-deploy@v1
52+
with:
53+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_PROD_API_TOKEN }}
54+
repo_token: ${{ secrets.GITHUB_TOKEN }}
55+
output_location: ${{ env.OUTPUT_LOCATION }}
56+
app_location: ${{ env.APP_LOCATION }}
57+
app_build_command: 'pnpm website build'
58+
action: 'upload'
59+
skip_api_build: true
60+
env:
61+
CUSTOM_BUILD_COMMAND: corepack enable && corepack prepare pnpm@10.9.0 --activate && pnpm install --frozen-lockfile && pnpm ui build && pnpm website build
62+
ENABLE_NODE_MONOREPO_BUILD: true
63+
NODE_VERSION: 22

.github/workflows/validate-pr.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Validate PR
2+
3+
env:
4+
APP_LOCATION: ''
5+
OUTPUT_LOCATION: 'packages/website/build'
6+
7+
on:
8+
pull_request:
9+
branches: [main, 'release/*']
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
jobs:
16+
validate:
17+
runs-on: ubuntu-latest
18+
name: Validate PR
19+
env:
20+
ENABLE_NODE_MONOREPO_BUILD: true
21+
NODE_VERSION: 22
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ env.NODE_VERSION }}
30+
31+
- name: Enable Corepack
32+
run: corepack enable
33+
34+
- name: Install pnpm
35+
run: corepack prepare pnpm@10.9.0 --activate
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Build UI Package
41+
run: pnpm ui build
42+
43+
- name: Build Documentation
44+
run: pnpm website build
45+
46+
- name: Run Quality Checks
47+
run: |
48+
pnpm lint:fix
49+
pnpm format
50+
pnpm typecheck
51+
pnpm file-lint

0 commit comments

Comments
 (0)