mirror of
https://github.com/MintCN/linux-insides-zh.git
synced 2026-05-05 12:05:23 +08:00
47 lines
881 B
YAML
47 lines
881 B
YAML
name: Deploy mdBook site to Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: mdbook-pages
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
with:
|
|
enablement: true
|
|
|
|
- name: Install mdBook
|
|
run: cargo install mdbook --locked
|
|
|
|
- name: Build book
|
|
run: mdbook build
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: book/html
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v5
|