mirror of https://github.com/Wilfred/difftastic/
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
name: Deploy Manual
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
pre_deploy:
|
|
runs-on: ubuntu-22.04
|
|
|
|
outputs:
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- id: skip_check
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
with:
|
|
concurrent_skipping: always
|
|
|
|
deploy:
|
|
needs: pre_deploy
|
|
if: needs.pre_deploy.outputs.should_skip != 'true'
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install jq
|
|
run: sudo apt-get install -y jq
|
|
|
|
- uses: dtolnay/rust-toolchain@1.66.0
|
|
- run: cargo doc
|
|
|
|
- name: Setup mdBook
|
|
uses: peaceiris/actions-mdbook@v2
|
|
with:
|
|
mdbook-version: '0.4.40'
|
|
|
|
- name: Build manual
|
|
run: mdbook build
|
|
working-directory: manual
|
|
|
|
- name: Build translated manual
|
|
run: mdbook build
|
|
working-directory: translation/zh-CN/manual-zh-CN
|
|
|
|
- name: Add rustdoc output
|
|
run: cp -r target/doc manual/book/rustdoc
|
|
|
|
- name: Add translated manual output
|
|
run: cp -r translation/zh-CN/manual-zh-CN/book manual/book/zh-CN
|
|
|
|
- name: Add homepage
|
|
run: cp -r homepage/* manual/book/
|
|
|
|
- name: Deploy to GitHub pages
|
|
uses: JamesIves/github-pages-deploy-action@v4.6.4
|
|
with:
|
|
branch: gh-pages
|
|
folder: manual/book
|
|
single-commit: true
|
|
force: true
|