41 lines
991 B
YAML
41 lines
991 B
YAML
name: Deploy Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'package.json'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-and-deploy:
|
|
runs-on: host
|
|
|
|
steps:
|
|
- name: Install Node.js requirements for Actions
|
|
run: |
|
|
if ! command -v node &> /dev/null; then
|
|
apk add --no-cache nodejs npm
|
|
fi
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Install dependencies
|
|
if: steps.version_check.outputs.changed == 'true'
|
|
run: npm ci --legacy-peer-deps
|
|
|
|
- name: Build documentation
|
|
if: steps.version_check.outputs.changed == 'true'
|
|
run: npm run build
|
|
|
|
- name: Deploy to Apache volume
|
|
if: steps.version_check.outputs.changed == 'true'
|
|
run: |
|
|
rm -rf /var/www/design-system
|
|
mkdir -p /var/www/design-system
|
|
cp -r dist/. /var/www/design-system/
|
|
chmod -R 755 /var/www/design-system/ |