这是一个我用来制作幻灯片的网站,请
src
├───.vuepress
│ ├───.cache
│ │ └───deps
│ ├───.temp
│ │ ├───components
│ │ ├───internal
│ │ ├───md-enhance
│ │ ├───pages
│ │ │ ├───bar
│ │ │ ├───demo
│ │ │ ├───foo
│ │ │ ├───guide
│ │ │ │ ├───bar
│ │ │ │ └───foo
│ │ │ ├───slides
│ │ │ │ ├───bar
│ │ │ │ └───foo
│ │ │ └───专业课程
│ │ ├───sass-palette
│ │ ├───theme-hope
│ │ └───vite-root
│ ├───dist
│ │ └───assets
│ │ ├───icon
│ │ └───image
│ ├───public
│ │ └───assets
│ │ ├───icon
│ │ └───image
│ └───styles
└───专业课程
该流
name: 部署 文 档
on:
push:
branches:
# 确保这是你正在 使用 的 分 支 名称
- main
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# 如果你文档需要 Git 子 模 块,取消 注 释下一 行
# submodules: true
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: 安 装 依 赖
run: yarn install --frozen-lockfile
- name: 构建文 档
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
yarn run docs:build
> src/.vuepress/dist/.nojekyll
- name: 部署 文 档
uses: JamesIves/github-pages-deploy-action@v4
with:
# 这是文 档部署 到 的 分 支 名称
branch: gh-pages
folder: src/.vuepress/dist
token: ${{ secrets.ACCESS_TOKEN }}
repository-name: wrm244/slides
sync-2-gitee:
needs: deploy-gh-pages
runs-on: ubuntu-latest
steps:
- name: Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
# 注意 在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
with:
# 注意 替 换为你的 GitHub 源 仓库地 址
source-repo: git@github.com:wrm244/slides.git
# 注意 替 换为你的 Gitee 目 标仓库地址
destination-repo: git@gitee.com:wrm244/slides.git
reload-pages:
needs: sync-2-gitee
runs-on: ubuntu-latest
steps:
- name: Build Gitee Pages
uses: yanglbme/gitee-pages-action@main
with:
# 注意 替 换为你的 Gitee 用 户名
gitee-username: wrm244
# 注意 在 Settings->Secrets 配置 GITEE_PASSWORD
gitee-password: ${{ secrets.GITEE_PASSWORD }}
# 注意 替 换为你的 Gitee 仓库,仓库名 严格区分 大小 写 ,请准确填写 ,否 则会出 错
gitee-repo: wrm244/slides
# 要 部署 的 分 支 ,默 认是 master,若 是 其他分 支 ,则需要 指定 (指定 的 分 支 必须存在 )
branch: gh-pages
EPL-1.0 ©