update github workflow for docusaurus
This commit is contained in:
parent
d2c755c3dd
commit
29f2e9f19a
17
.github/workflows/docs.yml
vendored
17
.github/workflows/docs.yml
vendored
@ -26,21 +26,34 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: yarn
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync nodejs npm doxygen
|
||||
npm install -g moxygen
|
||||
|
||||
- name: Build docs
|
||||
- name: Build doxygen docs
|
||||
run: |
|
||||
qmk --verbose generate-docs
|
||||
|
||||
- name: Install yarn dependencies
|
||||
working-directory: .build/docs
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Build Docusaurus
|
||||
working-directory: .build/docs
|
||||
run: yarn build
|
||||
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@v4.4.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BASE_BRANCH: master
|
||||
BRANCH: gh-pages
|
||||
FOLDER: .build/docs
|
||||
FOLDER: .build/docs/build
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
|
4
docs/package-lock.json
generated
4
docs/package-lock.json
generated
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "test",
|
||||
"name": "qmk_firmware_docs",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "test",
|
||||
"name": "qmk_firmware_docs",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.4.0",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "test",
|
||||
"name": "qmk_firmware_docs",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -26,7 +26,8 @@ def generate_docs(cli):
|
||||
if DOXYGEN_PATH.exists():
|
||||
shutil.rmtree(DOXYGEN_PATH)
|
||||
|
||||
shutil.copytree(DOCS_PATH, BUILD_DOCS_PATH)
|
||||
# ignore node_modules when we're testing locally
|
||||
shutil.copytree(DOCS_PATH, BUILD_DOCS_PATH, ignore=shutil.ignore_patterns("node_modules"))
|
||||
|
||||
# When not verbose we want to hide all output
|
||||
args = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user