Merge branch 'asar_19' into asar_2_beta #11
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: Deploy manual to Pages | |
on: | |
push: | |
branches: | |
# only doing this on asar2 right now since old manual needs a different deploy setup | |
- asar_2_beta | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # To push a branch | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install mdbook | |
run: | | |
tag=v0.4.36 | |
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | |
mkdir mdbook | |
curl -sSL $url | tar -xz --directory=./mdbook | |
echo `pwd`/mdbook >> $GITHUB_PATH | |
- name: Deploy GitHub Pages | |
run: | | |
cd docs/newbook | |
mdbook build | |
git worktree add gh-pages gh-pages | |
git config user.name "Deploy from CI" | |
git config user.email "" | |
cd gh-pages | |
# Delete the ref to avoid keeping history. | |
git update-ref -d refs/heads/gh-pages | |
rm -rf ${{ github.ref_name }} | |
mv ../book ${{ github.ref_name }} | |
git add . | |
git commit -m "Deploy $GITHUB_SHA to gh-pages" | |
git push --force --set-upstream origin gh-pages |