Files
hereconnect/.gitea/workflows/deploy.yaml
T
2024-12-02 10:38:45 +02:00

30 lines
931 B
YAML

name: Main daploy
run-name: ${{ github.actor }} deployed to build branch
on:
push:
branches:
- main
paths:
- 'apps/frontend/**'
jobs:
deploy:
runs-on: ubuntu-latest
container:
volumes:
- /www/hereconnect.condev.ru:/www/hereconnect.condev.ru
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Clean install dependencies and build
run: |
corepack enable
pnpm deploy --filter frontend --frozen-lockfile build/frontend
cd build/frontend
pnpm run build-only --emptyOutDir --outDir /www/hereconnect.condev.ru/build-${{env.GITHUB_SHA}}/
mv /www/hereconnect.condev.ru/current /www/hereconnect.condev.ru/old && mv /www/hereconnect.condev.ru/build-${{env.GITHUB_SHA}} /www/hereconnect.condev.ru/current && rm -rf /www/hereconnect.condev.ru/old