-
Notifications
You must be signed in to change notification settings - Fork 26
73 lines (64 loc) · 1.91 KB
/
deploy-docs.yml
File metadata and controls
73 lines (64 loc) · 1.91 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Deploy docs
on:
push:
branches:
- dev
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'pnpm'
- run: pnpm install
- name: Build package
run: pnpm run build
- name: Build docs
run: pnpm run docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: docs/.vitepress/dist
cname: view-shadcn-ui.devlive.org
deploy-playground:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install dependencies
run: |
cd playground
pnpm install
- name: Build
run: |
cd playground
pnpm run build
- name: Deploy to GitHub Pages
run: |
rm -rf /tmp/playground-dist
mkdir -p /tmp/playground-dist
cp -r playground/dist/* /tmp/playground-dist
cd /tmp/playground-dist
echo 'playground.view-shadcn-ui.devlive.org' > CNAME
git init
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git remote add origin "https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/devlive-community/playground.view-shadcn-ui.devlive.org.git"
git add .
git commit -m "deploy: playground on $(date '+%Y-%m-%d %H:%M:%S')"
git checkout -b dev
git push -u --force origin dev