Skip to content

Update documentation.yml #2

Update documentation.yml

Update documentation.yml #2

Workflow file for this run

name: Deploy documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install mdbook
run: cargo install mdbook
- name: Build documentation
run: cargo doc --no-deps
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git clone --branch gh-pages https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}.git gh-pages
rsync -av --delete target/doc/ gh-pages/
cd gh-pages
git add .
git commit -m "Update documentation"
git push origin gh-pages