CI #46
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Build mdbook | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
# mdbook-version: '0.4.10' | |
mdbook-version: 'latest' | |
- run: mdbook build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./book | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
# jobs: | |
# build: | |
# name: Build Gitbook | |
# runs-on: ubuntu-latest | |
# steps: | |
# # Check out the repo first | |
# - name: Checkout code | |
# uses: actions/checkout@v2 | |
# # Run this action to publish gitbook | |
# - name: Publish | |
# uses: tuliren/[email protected] | |
# with: | |
# # specify either github_token or personal_token | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# # personal_token: ${{ secrets.PERSONAL_TOKEN }} |