shacl-vue/.forgejo/workflows/deploy.yml

28 lines
852 B
YAML

name: Deploy on webserver
on:
push:
branches:
- main
jobs:
deploy:
if: forgejo.repository == 'www/shacl-vue.psychoinformatics.de'
name: Build docs and deploy
runs-on: site-deploy
container:
volumes:
# for depositing the built site directly
- /home/www/srv:/www:rw
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dev dependencies
run: npm ci --include=dev
- name: Build
run: npm run docs:build
- name: Deploy
run: cp -r docs/.vitepress/dist /www/shacl-vue.psychoinformatics.de-new && (test -d && mv /www/shacl-vue.psychoinformatics.de /www/shacl-vue.psychoinformatics.de-old || true); mv /www/shacl-vue.psychoinformatics.de-new /www/shacl-vue.psychoinformatics.de; rm -rf /www/shacl-vue.psychoinformatics.de-old