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