2024-09-11 22:14:15 +03:00
|
|
|
name: Deploy
|
2024-09-11 23:09:29 +03:00
|
|
|
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
|
2024-09-11 22:36:58 +03:00
|
|
|
needs: build
|
2024-09-11 22:22:49 +03:00
|
|
|
steps:
|
2024-09-11 22:31:06 +03:00
|
|
|
- uses: actions/download-artifact@v3
|
2024-09-11 22:22:49 +03:00
|
|
|
with:
|
|
|
|
name: website
|
2024-09-11 23:09:29 +03:00
|
|
|
- run: rsync --archive --delete-after ./ /var/www/popov.link/
|