Replace NBSP #58
Workflow file for this run
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 | |
- pull_request | |
- workflow_dispatch | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: '0.4.6' | |
# mdbook-version: 'latest' | |
- run: mdbook build | |
- name: Create artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: book | |
path: book | |
deploy: | |
name: Deploy | |
needs: build | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Fetch build artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: book | |
- name: Deploy to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: . | |
cname: guide.encode.moe |