Add Project structure and Writing code sections #79
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
# Build pull requests and deploy. | |
name: Deploy PR previews | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- closed | |
concurrency: preview-${{ github.ref }} | |
jobs: | |
deploy-preview: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install mdbook | |
run: | | |
make install | |
echo $(pwd)/mdbook >> $GITHUB_PATH | |
- name: Build the book | |
run: | | |
mdbook build | |
# NOTE: we can only deploy PR previews from the original repository. | |
# This action fails when the PR originates from a forked repository; | |
# see https://github.com/rossjrw/pr-preview-action/issues/3 for details. | |
- name: Deploy preview | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
force: false | |
clean-exclude: pr-preview/ | |
source-dir: book/html |