Skip to content

ci: add action for pushing docs updates #1

ci: add action for pushing docs updates

ci: add action for pushing docs updates #1

Workflow file for this run

name: docs
on:
pull_request:
push:
branches: master
jobs:
Docs:
runs-on: ubuntu-latest
steps:
- name: Check if any updates in docs
id: check
continue-on-error: true
run: |
git checkout master
git show --stat | grep -q docs
- name: Setup mdBook
if: steps.check.conclusion == 'success'
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: 'latest'
- name: Generate book
if: steps.check.conclusion == 'success'
run: |
cd docs
mdbook build
- name: Push to docs repo
if: steps.check.conclusion == 'success'
uses: XenonMolecule/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.DOCS_PUSH_GITHUB_TOKEN }}
with:
destination-github-username: 'teal-language'
destination-repository-name: 'teal-language.github.io'
user-email: hisham@gobolinux.org
target-branch: main
source-directory: 'docs/book'
target-directory: 'book'