Skip to content

Commit

Permalink
workflow: setup gitee deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Sep 30, 2021
1 parent 7a8179b commit 8826dc0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to Gitee

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set node version to 16
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn build
- run: |
cd .vitepress/dist
git init
git config user.email "[email protected]"
git config user.name "Evan You"
git add .
git commit -m "update docs"
git remote add origin https://yyx990803:${{ secrets.GITEE_TOKEN }}@gitee.com/vuejs-cn/vite-docs-cn.git
git push origin HEAD:master --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules/
.deploy*/
package-lock.json
.vitepress/dist
*.local

0 comments on commit 8826dc0

Please sign in to comment.