-
Notifications
You must be signed in to change notification settings - Fork 45
56 lines (47 loc) · 1.48 KB
/
docs.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
46
47
48
49
50
51
52
53
54
55
56
name: docs
on:
push:
pull_request:
workflow_dispatch:
jobs:
docs:
name: docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'false'
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.3.1'
- name: Build Packages
run: |
corepack enable
yarn install --immutable
yarn build
yarn workspace @chronocat/docs build
shell: bash
- name: Upload Docs
uses: actions/upload-artifact@v3
with:
name: chronocat-docs-${{ github.sha }}
path: packages/docs/build
- name: Download Dist
run: |
curl -fsSL -o - https://${{ secrets.DEPLOY_TOKEN }}@github.com/ilharp/chronocat-dist/archive/refs/heads/master.tar.gz | tar -zxvf - --strip-components=1 -C packages/docs/build
shell: bash
- name: Publish to Vercel
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_TOKEN }}
user_name: 'Il Harper'
user_email: '[email protected]'
external_repository: ilharp/chronocat-deploy
publish_branch: master
publish_dir: packages/docs/build
enable_jekyll: true # Not to create .nojekyll since this is not a gh page
commit_message: 'chore: publish ${{ github.sha }}'