2020-11-10 15:00:40 +00:00
|
|
|
name: Generate Docs
|
|
|
|
|
2022-12-22 23:41:16 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2020-11-10 15:00:40 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
2024-05-30 02:00:41 +00:00
|
|
|
- 'builddefs/docsgen/**'
|
2020-11-10 15:00:40 +00:00
|
|
|
- 'tmk_core/**'
|
|
|
|
- 'quantum/**'
|
|
|
|
- 'platforms/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- '.github/workflows/docs.yml'
|
2024-06-13 01:59:37 +00:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'builddefs/docsgen/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- '.github/workflows/docs.yml'
|
2020-11-10 15:00:40 +00:00
|
|
|
|
2024-05-30 02:00:41 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2020-11-10 15:00:40 +00:00
|
|
|
jobs:
|
|
|
|
generate:
|
|
|
|
runs-on: ubuntu-latest
|
2023-03-17 01:32:09 +00:00
|
|
|
container: ghcr.io/qmk/qmk_cli
|
2020-11-10 15:00:40 +00:00
|
|
|
|
|
|
|
steps:
|
2023-09-05 17:50:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-10 15:00:40 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 01:59:37 +00:00
|
|
|
apt-get update && apt-get install -y rsync doxygen
|
2024-05-30 02:00:41 +00:00
|
|
|
# install nvm
|
|
|
|
touch $HOME/.bashrc
|
2024-06-13 01:59:37 +00:00
|
|
|
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
2024-05-30 02:00:41 +00:00
|
|
|
|
|
|
|
- name: Install node
|
|
|
|
run: |
|
|
|
|
source $HOME/.bashrc
|
|
|
|
nvm install 20
|
|
|
|
nvm use 20
|
|
|
|
corepack enable
|
2020-11-10 15:00:40 +00:00
|
|
|
|
|
|
|
- name: Build docs
|
|
|
|
run: |
|
2024-05-30 02:00:41 +00:00
|
|
|
source $HOME/.bashrc
|
|
|
|
nvm use 20
|
2020-11-10 15:00:40 +00:00
|
|
|
qmk --verbose generate-docs
|
2024-05-30 02:00:41 +00:00
|
|
|
|
|
|
|
- name: Deploy
|
2024-06-13 01:59:37 +00:00
|
|
|
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
|
2024-07-05 22:25:48 +00:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.6.3
|
2024-05-30 02:00:41 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: gh-pages
|
|
|
|
folder: .build/docs
|
|
|
|
git-config-name: QMK Bot
|
|
|
|
git-config-email: hello@qmk.fm
|