Deploy commit: 删除解压缩 #596
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wiki Build and Deploy | |
run-name: 'Deploy commit: ${{ github.event.head_commit.message }}' | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build wiki | |
run: npm run docs:build | |
- name: Cache build | |
uses: actions/cache@v3 | |
with: | |
path: docs/.vuepress/dist | |
key: ${{ runner.os }}-build-cache-${{ github.sha }} | |
Deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Restore build cached | |
uses: actions/cache/restore@v3 | |
with: | |
path: docs/.vuepress/dist | |
key: ${{ runner.os }}-build-cache-${{ github.sha }} | |
- name: Deploy wiki | |
run: | | |
git config --global user.name "huxins" | |
git config --global user.email "[email protected]" | |
cd docs/.vuepress/dist | |
echo "wikis.inxiny.cn" > CNAME | |
git init | |
git add -A | |
git commit -m "first commit" | |
git push -f ${{ secrets.git }} master:gh-pages |