mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
add documentation deployment woekflow
This commit is contained in:
parent
ba97d0e4de
commit
eb25f5f8b7
42
.github/workflows/deploy-documentation.yml
vendored
Normal file
42
.github/workflows/deploy-documentation.yml
vendored
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user