docs: change docs publich path

This commit is contained in:
winixt 2023-03-31 15:31:17 +08:00
parent c162749eae
commit d35e066472

View File

@ -1,50 +1,50 @@
name: Deploy Docs name: Deploy Docs
on: on:
push: push:
branches: branches:
- master - master
paths: paths:
- 'docs/**/**' - 'docs/**/**'
- 'package.json' - 'package.json'
jobs: jobs:
build-and-deploy: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.1 uses: actions/checkout@v2.3.1
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: yarn && yarn docs:build run: yarn && yarn docs:build
- name: Deploy - name: Deploy
uses: easingthemes/ssh-deploy@main uses: easingthemes/ssh-deploy@main
env: env:
# 本地.ssh文件下的私钥id_rsa存在secrets的TOKEN中 # 本地.ssh文件下的私钥id_rsa存在secrets的TOKEN中
SSH_PRIVATE_KEY: ${{ secrets.HARRYWAN_PRIVATE_KEY }} SSH_PRIVATE_KEY: ${{ secrets.HARRYWAN_PRIVATE_KEY }}
# 源目录,相对于$GITHUB_WORKSPACE根目录的路径 # 源目录,相对于$GITHUB_WORKSPACE根目录的路径
SOURCE: docs/.vuepress/dist/ SOURCE: docs/.vuepress/dist/
# 服务器域名 # 服务器域名
REMOTE_HOST: ${{ secrets.TX_IP }} REMOTE_HOST: ${{ secrets.TX_IP }}
# 腾讯云默认用户名为root # 腾讯云默认用户名为root
REMOTE_USER: root REMOTE_USER: root
# 目标目录 # 目标目录
TARGET: /data/web-packages/p/fesjs TARGET: /data/web-packages/p/fesjs/2.0
build-and-deploy-pages: build-and-deploy-pages:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout 🛎️ - name: Checkout 🛎️
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: | run: |
yarn yarn
yarn docs:build-pages yarn docs:build-pages
- name: Deploy 🚀 - name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.3 uses: JamesIves/github-pages-deploy-action@v4.3.3
with: with:
branch: gh-pages # The branch the action should deploy to. branch: gh-pages # The branch the action should deploy to.
folder: docs/.vuepress/dist folder: docs/.vuepress/dist
token: ${{ secrets.ACCESS_TOKEN }} token: ${{ secrets.ACCESS_TOKEN }}