-
Notifications
You must be signed in to change notification settings - Fork 23
45 lines (34 loc) · 1.13 KB
/
deploy.yml
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
name: deploy
on:
push:
branches: ['main']
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
- run: pnpm -v
- run: pnpm install
- run: pnpm -F @gkd-kit/docs exec tsx ./.vitepress/scripts/updateVersion.ts
- run: pnpm -F @gkd-kit/api run predocs:dev
- run: pnpm -F @gkd-kit/docs run docs:build-mirror
- name: Publish package
run: |
pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
pnpm -F @gkd-kit/docs publish --no-git-checks
- run: |
curl -X PUT 'https://registry-direct.npmmirror.com/@gkd-kit/docs/sync'
sleep 5
curl https://registry.npmmirror.com/@gkd-kit/docs/latest/files/package.json
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: gkd-docs
directory: ./docs/.vitepress/dist