Update submodule #6
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
# GitHub Actions Documentation: https://docs.github.com/en/actions | |
name: "build" | |
on: | |
push: | |
branches: | |
- "main" | |
jobs: | |
build-and-deploy: | |
name: "Build and Deploy" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout repository" | |
uses: "actions/checkout@v2" | |
with: | |
submodules: "recursive" | |
- name: "Setup cache" | |
uses: "actions/cache@v2" | |
id: "cache" | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}" | |
- name: "Install mdbook" | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: "cargo install mdbook" | |
- name: "Build TOC and Colophon" | |
run: | | |
php tools/toc.php | |
php tools/colophon.php | |
- name: "Build phplang.org" | |
run: | | |
mdbook build | |
cp CNAME book/CNAME | |
- name: "Deploy to GitHub Pages" | |
uses: "JamesIves/[email protected]" | |
with: | |
branch: "gh-pages" | |
folder: "book" |