-
-
Notifications
You must be signed in to change notification settings - Fork 837
48 lines (48 loc) · 1.3 KB
/
website.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
name: Website
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
name: deploy website
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install website dependencies
run: pnpm install
working-directory: ./website
- name: Build website
run: pnpm build
working-directory: ./website
- name: Make CNAME file
run: |
cd ./website/src/.vitepress/dist
echo "vue-chartjs.org" > CNAME
- name: Prepare build
run: |
cd ./website/src/.vitepress/dist
git init
git add -A
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
- name: Push build
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./website/src/.vitepress/dist