-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.21 KB
/
static.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
name: GitHub Actions Build and Deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: "18.16.0"
- name: Install and Build 🔧
run: |
npm ci --force
npm run build
- name: 推送到代码仓库
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_REF: "github.com/songxingguo/brain.git"
CO_TOKEN: ${{ secrets.CO_TOKEN }}
CO_REF: "e.coding.net/songxingguo/songxingguo.coding.me/brain.git"
run: |
cd ./src/.vuepress/dist
git init
git config user.name "songxingguo"
git config user.email "[email protected]"
git add .
git commit -m "Update Blog By GithubAction With Build $TRAVIS_BUILD_NUMBER"
# Github Pages
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages
# Coding Pages
git push --force --quiet "https://zrUWsPQJyF:${CO_TOKEN}@${CO_REF}" master:master