add documentation deployment woekflow

This commit is contained in:
mahula 2023-11-27 10:28:23 +01:00
parent ba97d0e4de
commit eb25f5f8b7

View File

@ -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