diff --git a/.github/file-filters.yml b/.github/file-filters.yml index 186941d27..1cc5438ce 100644 --- a/.github/file-filters.yml +++ b/.github/file-filters.yml @@ -12,13 +12,16 @@ webapp: &webapp - 'webapp/**/*' - 'package.json' -markdown: &markdown - - '**/*.md' +docs-check: &docs-check - '.github/workflows/check-documentation.yml' + +markdown: &markdown + - *docs-check + - '**/*.md' - '.github/workflows/mlc_config.json' vuepress: &vuepress - - '.github/workflows/check-documentation.yml' + - *docs-check - '.github/workflows/deploy-documentation.yml' - '.vuepress/**/*' - 'package.json' diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index 3f9f090be..9a2716a5d 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -16,27 +16,33 @@ jobs: uses: actions/checkout@master - name: Check for file changes - uses: dorny/paths-filter@v2.11.1 + uses: dorny/paths-filter@master id: changes with: token: ${{ github.token }} filters: .github/file-filters.yml list-files: shell - build-and-deploy-documentation: - name: Build and deploy documentation + build-and-deploy: runs-on: ubuntu-latest - needs: files-changed - if: needs.files-changed.outputs.documentation == 'true' steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@master - - name: Vuepress Build and Deploy - uses: jenkey2011/vuepress-deploy@master + - name: Setup Node 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Build Vuepress Pages + run: npm install && npm run build + + - name: Deploy Vuepress to Github Pages + uses: crazy-max/ghaction-github-pages@v4 + with: + target_branch: gh-pages + build_dir: .vuepress/dist + author: Wolfgang Huß + fqdn: docs.ocelot.social env: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - TARGET_REPO: Ocelot-Social-Community/Ocelot-Social - TARGET_BRANCH: gh-pages - BUILD_SCRIPT: npm install && npm run docs:build -- --config docs/.vuepress/config github.js - BUILD_DIR: .vuepress/dist + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}