-
Notifications
You must be signed in to change notification settings - Fork 10
36 lines (33 loc) · 1.02 KB
/
deploy.yml
File metadata and controls
36 lines (33 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
inputs:
reason:
description: 'why this workflow is triggered'
required: true
default: 'manually deploy site'
jobs:
deploy_gh_pages:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install mdbook
run: |
wget https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz -O ~/mdbook.tar.gz
tar xvf ~/mdbook.tar.gz -C ~
- name: Build docs
working-directory: ./docs
run: ~/mdbook build
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./docs/book
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
force_orphan: true