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