From 5f57c9ef9f165079fe0c91af85e9233c5e775e5f Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:06:22 +0200 Subject: [PATCH 01/11] Update config.js --- docs/.vuepress/config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 022261cc..b1ad0948 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,4 +1,5 @@ module.exports = { + base: '/phpinsights/' title: 'PHP Insights', description: 'The perfect starting point to analyze the code quality of your PHP projects', sidebar: true, From 968cd32713883dcc50cc3aeca65ae9cb7538261b Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:07:05 +0200 Subject: [PATCH 02/11] Create docs.yml --- .github/workflows/docs.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 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 00000000..2db1db79 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: docs + +on: + # trigger deployment on every push to main branch + push: + branches: [main] + # trigger deployment manually + workflow_dispatch: + +jobs: + docs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + # fetch all commits to get last updated time or other git log info + fetch-depth: 0 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + # choose node.js version to use + node-version: 22 + # cache deps for pnpm + cache: pnpm + + - name: Install deps + run: pnpm install --frozen-lockfile + + # run build script + - name: Build VuePress site + run: pnpm docs:build + + # please check out the docs of the workflow for more details + # @see https://github.com/crazy-max/ghaction-github-pages + - name: Deploy to GitHub Pages + uses: crazy-max/ghaction-github-pages@v4 + with: + # deploy to gh-pages branch + target_branch: gh-pages + # deploy the default output dir of VuePress + build_dir: docs/.vuepress/dist + env: + # @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3cf9d244a36e22fdf590b701a42c3be784fc4c18 Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:11:42 +0200 Subject: [PATCH 03/11] Update docs.yml --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2db1db79..f2e4c2bd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -19,6 +19,8 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 + with: + version: latest - name: Setup Node.js uses: actions/setup-node@v4 From 8f40549fb0c0fd7a9d5e3ca243efe3ed66cd36ec Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:15:54 +0200 Subject: [PATCH 04/11] Update docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f2e4c2bd..865483e7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,7 +20,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 with: - version: latest + version: 10.18.2 - name: Setup Node.js uses: actions/setup-node@v4 From 7cff767862a26a97c143af6ca2d5e2525d63d8c8 Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:18:56 +0200 Subject: [PATCH 05/11] Update docs.yml --- .github/workflows/docs.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 865483e7..968283de 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,25 +17,23 @@ jobs: # fetch all commits to get last updated time or other git log info fetch-depth: 0 - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.18.2 - - name: Setup Node.js uses: actions/setup-node@v4 with: # choose node.js version to use node-version: 22 - # cache deps for pnpm - cache: pnpm + # cache deps for npm + cache: npm + cache-dependency-path: docs/package-lock.json - name: Install deps - run: pnpm install --frozen-lockfile + working-directory: ./docs + run: npm ci # run build script - name: Build VuePress site - run: pnpm docs:build + working-directory: ./docs + run: npm run docs:build # please check out the docs of the workflow for more details # @see https://github.com/crazy-max/ghaction-github-pages From a1e07257f84c4d9a928e35872c85fd3469456c03 Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:21:06 +0200 Subject: [PATCH 06/11] Update docs.yml --- .github/workflows/docs.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 968283de..773588c1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,9 +22,6 @@ jobs: with: # choose node.js version to use node-version: 22 - # cache deps for npm - cache: npm - cache-dependency-path: docs/package-lock.json - name: Install deps working-directory: ./docs From 604f6e4491d52a7b2b238957ecb1bd2d28f75997 Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:22:29 +0200 Subject: [PATCH 07/11] Update docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 773588c1..98cbcd7a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,7 @@ jobs: - name: Install deps working-directory: ./docs - run: npm ci + run: npm install # run build script - name: Build VuePress site From a6b58d21b3b7f81810ea2018133d17c02398074b Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:27:03 +0200 Subject: [PATCH 08/11] Update docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 98cbcd7a..c495f331 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: # run build script - name: Build VuePress site working-directory: ./docs - run: npm run docs:build + run: npx vuepress build # please check out the docs of the workflow for more details # @see https://github.com/crazy-max/ghaction-github-pages From a9ad9b51d2789b7410bb4e7324f5af26aa0e7e34 Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:28:52 +0200 Subject: [PATCH 09/11] Update config.js --- docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index b1ad0948..5f96260e 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,5 +1,5 @@ module.exports = { - base: '/phpinsights/' + base: '/phpinsights/', title: 'PHP Insights', description: 'The perfect starting point to analyze the code quality of your PHP projects', sidebar: true, From cc25706c3744f545ad402a9494b936da746a8d8b Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:42:31 +0200 Subject: [PATCH 10/11] Update docs.yml --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c495f331..6e39b368 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,7 +21,7 @@ jobs: uses: actions/setup-node@v4 with: # choose node.js version to use - node-version: 22 + node-version: 16 - name: Install deps working-directory: ./docs From f860410b7490d999db3e7c73734d954e32c2fa2a Mon Sep 17 00:00:00 2001 From: Nik Spyratos <17888779+nikspyratos@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:47:19 +0200 Subject: [PATCH 11/11] Update docs.yml --- .github/workflows/docs.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6e39b368..c5026274 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,6 +27,16 @@ jobs: working-directory: ./docs run: npm install + - name: Copy changelog + run: cp CHANGELOG.md docs/changelog.md + + - name: Copy assets + run: | + mkdir -p docs/.vuepress/public + cp art/logo_mixed.gif docs/.vuepress/public/logo.gif + cp art/heart.svg docs/.vuepress/public/heart.svg + cp art/heart.png docs/.vuepress/public/heart.png + # run build script - name: Build VuePress site working-directory: ./docs