From eb25f5f8b7a018de2df51211d9a177fefb545d80 Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 27 Nov 2023 10:28:23 +0100 Subject: [PATCH] add documentation deployment woekflow --- .github/workflows/deploy-documentation.yml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/deploy-documentation.yml diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml new file mode 100644 index 000000000..9a22f51f1 --- /dev/null +++ b/.github/workflows/deploy-documentation.yml @@ -0,0 +1,42 @@ +name: ocelot.social deploy documentation + +on: + push: + branches: + - master + +jobs: + files-changed: + name: Detect File Changes - Markdown and Vuepress files + runs-on: ubuntu-latest + outputs: + documentation: ${{ steps.changes.outputs.documentation }} + steps: + - name: Checkout code + uses: actions/checkout@master + + - name: Check for file changes + uses: dorny/paths-filter@v2.11.1 + id: changes + with: + token: ${{ github.token }} + filters: .github/file-filters.yml + list-files: shell + + build-and-deploy-documentation: + name: Build and deploy documentation + runs-on: ubuntu-latest + needs: files-changed + if: needs.files-changed.outputs.documentation == 'true' + steps: + - name: Checkout code + uses: actions/checkout@master + + - name: Vuepress Build and Deploy + uses: jenkey2011/vuepress-deploy@master + 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