config doc deployment in doc deployment workflow

This commit is contained in:
mahula 2024-01-25 10:38:00 +01:00
parent 030da181a2
commit 8f2c6ababb
2 changed files with 25 additions and 16 deletions

View File

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

View File

@ -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ß <vorstand@busfaktor.org>
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 }}