55 types : [ published ]
66
77jobs :
8- deploy-gh-pages :
9- needs :
10- - publish-npm
11- - publish-github
12- runs-on : ubuntu-latest
13- steps :
14- - uses : actions/checkout@v3
15- with :
16- fetch-depth : 0
17- - uses : pnpm/action-setup@v2
18- with :
19- version : latest
20- - uses : actions/setup-node@v3
21- with :
22- node-version : ' 18.x'
23- cache : ' pnpm'
24- - run : pnpm install
25- - name : Build
26- run : pnpm run docs:build
27- - name : Deploy
28- uses : peaceiris/actions-gh-pages@v3
29- with :
30- github_token : ${{ secrets.GH_TOKEN }}
31- publish_dir : docs/.vitepress/dist
32-
33- deploy-playground :
34- needs :
35- - publish-npm
36- - publish-github
37- runs-on : ubuntu-latest
38- steps :
39- - uses : actions/checkout@v3
40- - uses : pnpm/action-setup@v2
41- with :
42- version : latest
43- - uses : actions/setup-node@v3
44- with :
45- node-version : ' 18.x'
46- cache : ' pnpm'
47-
48- - name : Install dependencies
49- run : |
50- cd playground
51- pnpm install
52-
53- - name : Build
54- run : |
55- cd playground
56- pnpm run build
57-
58- - name : Deploy to GitHub Pages
59- run : |
60- rm -rf /tmp/playground-dist
61- mkdir -p /tmp/playground-dist
62- cp -r playground/dist/* /tmp/playground-dist
63- cd /tmp/playground-dist
64-
65- echo 'playground.view-shadcn-ui.devlive.org' > CNAME
66-
67- git init
68- git config --global user.name "${GITHUB_ACTOR}"
69- git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
70- git remote add origin "https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/devlive-community/playground.view-shadcn-ui.devlive.org.git"
71-
72- git add .
73- git commit -m "deploy: playground on $(date '+%Y-%m-%d %H:%M:%S')"
74- git checkout -b dev
75- git push -u --force origin dev
76-
778 publish-npm :
789 runs-on : ubuntu-latest
7910 steps :
12051 echo "@devlive-community:registry=https://npm.pkg.github.com" >> .npmrc
12152 pnpm publish --no-git-checks --access public
12253 env:
123- NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }}
54+ NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGE_TOKEN }}
0 commit comments