Skip to content

Commit 0790ce3

Browse files
committed
feat: add action to deploy one-platform-branch to /one-platform for usage as github-page
1 parent 83121df commit 0790ce3

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy one-platform to /one-platform on main
2+
3+
on:
4+
push:
5+
branches: ["one-platform"]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout one-platform
15+
uses: actions/checkout@v4
16+
with:
17+
ref: one-platform
18+
path: one
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: npm
24+
cache-dependency-path: one/package-lock.json
25+
- name: Install deps
26+
working-directory: one
27+
env:
28+
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}
29+
ASSET_INIT_VECTOR: ${{ secrets.ASSET_INIT_VECTOR }}
30+
run: npm ci
31+
- name: Build
32+
working-directory: one
33+
run: npm run build
34+
- name: Checkout main
35+
uses: actions/checkout@v4
36+
with:
37+
ref: main
38+
path: main
39+
- name: Copy build into main/one-platform and push
40+
run: |
41+
rm -rf main/one-platform/*
42+
mkdir -p main/one-platform
43+
cp -R one/public/* main/one-platform/
44+
45+
cd main
46+
git config user.name "github-actions[bot]"
47+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
48+
git add one-platform
49+
git commit -m "deploy(one-platform): $(date -u +%Y-%m-%dT%H:%M:%SZ)" || echo "No changes to commit"
50+
git push

app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const appConfig: AppConfig = {
22
title: "Design System",
33
hostname: "https://db-ux-design-system.github.io",
4-
basePath: "",
4+
basePath: "/one-platform/",
55
sitemapBlacklist: [],
66
language: "en",
77
};

0 commit comments

Comments
 (0)