39 lines
989 B
YAML
39 lines
989 B
YAML
name: Deploy Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'package.json'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check-and-deploy:
|
|
runs-on: host
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
run: |
|
|
if [ -d ".git" ]; then
|
|
git fetch --depth=2
|
|
git reset --hard FETCH_HEAD
|
|
else
|
|
git clone --depth=2 https://git.novaprojects.dev/unkn0wn/nova-design-system.git .
|
|
fi
|
|
|
|
- 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/ |