【发布时间】:2020-10-07 20:31:00
【问题描述】:
我想自动构建和发布托管在 Github 上的开源 typescript 项目的 docs。
我试过 TypeDoc,生成的 docs 文件夹是 23Mo。我不想在项目的仓库中提交它。
理想情况下,在每个版本中,我都希望使用 github 操作:
- 生成文档
- 将生成的
docs文件夹推送到它自己的 github 存储库。
目前我添加了一个 npm 脚本来生成文档:docs: typedoc --out docs src,这是我的 github 操作文件的起点:
name: Docs
on:
release:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Generate docs
run: |
npm ci
npm run docs
通过这个操作,我如何提交并将这个生成的目录推送到它自己在 github 上的 repo?
(也许有更传统的方法可以做到这一点。让我知道)
【问题讨论】:
标签: github-actions