Update download.md #38
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- site | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 克隆本分支仓库 | |
uses: actions/checkout@v2 | |
- name: 克隆 main 分支仓库 | |
uses: actions/checkout@v2 | |
with: | |
path: scl-src | |
ref: main | |
- name: 安装 GTK 3.0 和 Webkit2GTK 4.0 开发依赖 | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install libgtk-3-dev libwebkit2gtk-4.0-dev | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- run: pip install mkdocs-material | |
- name: 执行 MkDocs 构建站点 | |
run: mkdocs build | |
- name: 安装 Rust 工具链 | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
components: rust-docs | |
override: true | |
- name: 生成 SCL 开发文档 | |
run: | | |
cargo doc --manifest-path=scl-src/Cargo.toml --all-features --no-deps | |
cp -rf scl-src/target/doc site/scl-doc | |
- name: 写入 Microsoft 应用代码 | |
uses: DamianReeves/write-file-action@master | |
with: | |
path: ./site/.well-known/microsoft-identity-association.json | |
contents: | | |
{"associatedApplications":[{"applicationId":"baa479dc-3c41-47e5-8bf4-b468d4c989c7"}]} | |
write-mode: append | |
- name: 部署到 Github Pages 分支 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./site |