feat: add workflow for website deployment
Deploy Documentation / check-and-deploy (push) Successful in 28s
Deploy Documentation / check-and-deploy (push) Successful in 28s
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
name: Deploy Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
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
|
||||
run: npm ci --legacy-peer-deps
|
||||
|
||||
- name: Build documentation
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to Apache volume
|
||||
run: |
|
||||
find /var/www/louis-potevin.dev -mindepth 1 -delete
|
||||
|
||||
cp -r dist/. /var/www/louis-potevin.dev/
|
||||
|
||||
chmod -R 755 /var/www/louis-potevin.dev/
|
||||
Reference in New Issue
Block a user