From 42ac2899a778f0767ce0c65fd051858da18aa157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Wed, 17 May 2023 08:37:04 +0200 Subject: [PATCH 1/2] fix: missing nodes typing for docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- package-lock.json | 15 +++++++-------- package.json | 1 + 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5a3c46b4..95408347 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "3.1.0", "license": "GPL-3.0-or-later", "dependencies": { + "@types/node": "^20.1.7", "semver": "^7.5.1" }, "devDependencies": { @@ -1190,10 +1191,9 @@ } }, "node_modules/@types/node": { - "version": "18.7.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", - "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==", - "dev": true + "version": "20.1.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.7.tgz", + "integrity": "sha512-WCuw/o4GSwDGMoonES8rcvwsig77dGCMbZDrZr2x4ZZiNW4P/gcoZXe/0twgtobcTkmg9TuKflxYL/DuwDyJzg==" }, "node_modules/@types/prettier": { "version": "2.7.2", @@ -5265,10 +5265,9 @@ } }, "@types/node": { - "version": "18.7.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", - "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==", - "dev": true + "version": "20.1.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.7.tgz", + "integrity": "sha512-WCuw/o4GSwDGMoonES8rcvwsig77dGCMbZDrZr2x4ZZiNW4P/gcoZXe/0twgtobcTkmg9TuKflxYL/DuwDyJzg==" }, "@types/prettier": { "version": "2.7.2", diff --git a/package.json b/package.json index 7a8a9e65..a01af200 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "url": "https://github.com/nextcloud/nextcloud-event-bus" }, "dependencies": { + "@types/node": "^20.1.7", "semver": "^7.5.1" }, "devDependencies": { From 176e8c9ff99631ebe380ef09b98c085632928957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Wed, 17 May 2023 08:46:21 +0200 Subject: [PATCH 2/2] feat: test docs build on pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- .github/workflows/doc-publish.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index b7330898..a00944cb 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -1,32 +1,33 @@ -name: Doc Publish +name: Documentation on: + pull_request: release: types: [published] jobs: - publish: + build-and-deploy: runs-on: ubuntu-latest - name: Publish doc + name: Build and deploy steps: - name: Check actor permission level - uses: skjnldsv/check-actor-permission@v2 + uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2 with: require: admin - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@v1.2 + uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 id: versions with: fallbackNode: '^16' fallbackNpm: '^8' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@v2 + uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -36,11 +37,13 @@ jobs: - name: Install dependencies & build run: | npm ci - npm run build - npm run build:doc + npm run build --if-present + npm run build:doc --if-present - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + # Only deploy on release + if: github.event.release + uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./dist/doc