2020-11-10 15:00:40 +00:00
|
|
|
name: Generate Docs
|
|
|
|
|
2022-12-23 10:41:16 +11:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2020-11-10 15:00:40 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
2024-05-30 12:00:41 +10:00
|
|
|
- 'builddefs/docsgen/**'
|
2020-11-10 15:00:40 +00:00
|
|
|
- 'tmk_core/**'
|
|
|
|
- 'quantum/**'
|
|
|
|
- 'platforms/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- '.github/workflows/docs.yml'
|
2024-06-13 02:59:37 +01:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'builddefs/docsgen/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- '.github/workflows/docs.yml'
|
2020-11-10 15:00:40 +00:00
|
|
|
|
2024-05-30 12:00:41 +10: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 18:50:04 +01:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-10 15:00:40 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 02:59:37 +01:00
|
|
|
apt-get update && apt-get install -y rsync doxygen
|
2024-05-30 12:00:41 +10:00
|
|
|
# install nvm
|
|
|
|
touch $HOME/.bashrc
|
2024-06-13 02:59:37 +01:00
|
|
|
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
2024-05-30 12:00:41 +10: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 12:00:41 +10:00
|
|
|
source $HOME/.bashrc
|
|
|
|
nvm use 20
|
2020-11-10 15:00:40 +00:00
|
|
|
qmk --verbose generate-docs
|
2024-05-30 12:00:41 +10:00
|
|
|
|
|
|
|
- name: Deploy
|
2024-06-13 02:59:37 +01:00
|
|
|
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
|
2024-12-03 19:31:16 +00:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.7.2
|
2024-05-30 12:00:41 +10:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
branch: gh-pages
|
|
|
|
folder: .build/docs
|
|
|
|
git-config-name: QMK Bot
|
|
|
|
git-config-email: hello@qmk.fm
|