Skip to content

[GITHUB] changeing how docs are deployed #3

[GITHUB] changeing how docs are deployed

[GITHUB] changeing how docs are deployed #3

Workflow file for this run

name: Ygen rust workflow
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: cargo check --all
- name: Run tests
run: cargo test --all
- name: Build docs
- run: cargo doc --no-deps
- name: Deploy docs to doc branch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git clone --branch=doc https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git doc
rsync -av target/doc/ doc/
cd doc
git add --all
git commit -m 'Update documentation'
git push origin doc