Skip to content

Update docs

Update docs #1084

Workflow file for this run

name: Update docs
on:
push:
branches:
- main
- "release/**"
schedule:
# https://crontab.guru/#3_21_*_*_6
- cron: "3 21 * * 6"
jobs:
build:
runs-on: ubuntu-latest
# don't run this in forks, because contributors maybe don't have forked the docs repository
# also don't run when this run is caused by dependabot because then we won't have access to the ssh key secret
if: startsWith(github.repository, 'codeoverflow-org') && github.actor != 'dependabot[bot]'
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10.8
- uses: actions/checkout@v4
- name: Checkout docs
uses: actions/checkout@v4
with:
repository: codeoverflow-org/nodecg-io-docs
path: docs
ssh-key: ${{ secrets.DOCS_SSH_KEY }}
ref: ${{ github.ref }}
- name: Build docs
run: python .scripts/build-docs.py
- name: GitHub Push
run: |
cd docs
git config --global user.email "<>"
git config --global user.name "codeoverflow-org"
git add .
git diff-index --quiet HEAD || git commit --message "Update generated documentation (codeoverflow-org/nodecg-io@${{ github.sha }})"
git push origin "${GITHUB_REF#refs/heads/}"