Changes in corelation wiht new GH Action Permission Changes. (#443) #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: generate github pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/website.yaml" | |
- "docs/**" | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 | |
permissions: | |
actions: read | |
contents: write | |
deployments: read | |
packages: none | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Set TOOLS_BIN_DIR and add to PATH | |
run: | | |
TOOLS_BIN_DIR="${HOME}/.cargo/bin" | |
echo "TOOLS_BIN_DIR=${TOOLS_BIN_DIR}" >> ${GITHUB_ENV} | |
echo "${TOOLS_BIN_DIR}" >> ${GITHUB_PATH} | |
- name: Build | |
run: make -C docs/book build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/book/book |