popov.link/.gitea/workflows/deploy.yml

32 lines
660 B
YAML
Raw Normal View History

2024-09-11 22:14:15 +03:00
name: Deploy
on:
push:
branches:
- master
2024-09-11 22:14:15 +03:00
jobs:
2024-09-11 22:22:49 +03:00
build:
container: gitea/runner-images:ubuntu-latest
runs-on: ubuntu-latest
2024-09-11 22:14:15 +03:00
steps:
- uses: actions/checkout@v4
2024-09-11 22:22:49 +03:00
- uses: actions/setup-node@v4
with:
2024-09-11 22:33:47 +03:00
node-version: 22
2024-09-11 22:22:49 +03:00
- run: npm ci
- run: npm run build
2024-09-11 22:33:47 +03:00
- uses: actions/upload-artifact@v3
2024-09-11 22:22:49 +03:00
with:
name: website
path: dist/
2024-09-11 22:26:51 +03:00
compression-level: 9
2024-09-11 22:22:49 +03:00
deploy:
runs-on: self-hosted
needs: build
2024-09-11 22:22:49 +03:00
steps:
- uses: actions/download-artifact@v3
2024-09-11 22:22:49 +03:00
with:
name: website
- run: rsync --archive --delete-after ./ /var/www/popov.link/