-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (42 loc) · 1.34 KB
/
main.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
name: pushDocs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Use Node.js 18
uses: actions/[email protected]
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Build VuePress
run: yarn build
- name: Deploy to Pages
run: |
cd docs/.vitepress/dist
git init
git branch -m master
git config --global user.name "am-abudu"
git config --global user.email "${{ secrets.GIT_EMAIL }}"
git add -A
git commit -m 'deploy'
git push -f https://am-abudu:${{ secrets.ACCESS_TOKEN }}@github.com/Qexo/Wiki.git master:gh-pages
- name: Deploy to My Blog
run: |
cd docs/.vitepress/dist
rm -rf .git
cd ..
git clone https://am-abudu:${{ secrets.ACCESS_TOKEN }}@github.com/am-abudu/hexo_source_code.git
mkdir -p hexo_source_code/source/qexo/
rm -rf hexo_source_code/source/qexo/*
cp -r dist/* hexo_source_code/source/qexo/
cd hexo_source_code
git add -A
git commit -m 'deploy'
git push -f https://am-abudu:${{ secrets.ACCESS_TOKEN }}@github.com/am-abudu/hexo_source_code.git