Skip to content

Update ad-m/github-push-action action to v1.3.0 (#34) #90

Update ad-m/github-push-action action to v1.3.0 (#34)

Update ad-m/github-push-action action to v1.3.0 (#34) #90

Workflow file for this run

name: Docs
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: generate documentation
run: cargo doc --no-deps
- name: prep deployment branch
if: github.ref == 'refs/heads/main'
run: |
mkdir -p dist
cp -r target/doc/* dist/
cd dist
git init
git add -A
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
- name: push deployment branch
uses: ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # v1.3.0
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./dist