From 5fd34394be386acb09da5addbfea3a8c098315c5 Mon Sep 17 00:00:00 2001 From: zvecr Date: Tue, 9 Jul 2024 13:33:36 +0100 Subject: [PATCH] Add docs publish workflow --- .github/workflows/docs.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..47bf387 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,38 @@ +name: Generate Docs + +on: + push: + branches: + - main + + pull_request: + paths: + - 'src/**' + - '.github/workflows/docs.yml' + - 'package.json' + - 'yarn.lock' + +jobs: + generate: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Build docs + run: | + yarn install + yarn build + + - name: Deploy + if: ${{ github.event_name != 'pull_request' }} + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + branch: gh-pages + folder: .build/docs + git-config-name: QMK Bot + git-config-email: hello@qmk.fm