fix the toolchain #19
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: Github Pages | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v2 | |
with: | |
mdbook-version: 'latest' | |
- run: mdbook build book | |
- name: Set output directory | |
run: | | |
OUTDIR=$(basename ${{ github.ref }}) | |
echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV | |
- name: Deploy stable | |
uses: peaceiris/actions-gh-pages@v4 | |
if: startswith(github.ref, 'refs/tags/') | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./book/book | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./book/book | |
destination_dir: ./${{ env.OUTDIR }} | |
generate-con: | |
name: Generate CONTRIBUTORS.svg | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: deploy | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Pull gh-pages | |
run: | | |
git config --global user.name 'Adam Perkowski' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/adamperkowski/highlightos | |
git checkout --orphan gh-pages | |
git rm -rf . | |
git pull origin gh-pages | |
git checkout gh-pages | |
- name: Generate Contributors Images | |
uses: jaywcjlove/github-action-contributors@main | |
with: | |
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\]) | |
output: CONTRIBUTORS.svg | |
avatarSize: 42 | |
- name: Push the svg | |
run: | | |
git add CONTRIBUTORS.svg || true | |
git commit -am "update `CONTRIBUTORS.svg`" || true | |
git push --set-upstream origin gh-pages || true |