-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.24 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# https://github.com/actions/deploy-pages#usage
name: Deploy to Ukraina com ua
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy with rsync
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avzr --delete
path: .
remote_host: ${{ secrets.REMOTE_HOST }}
remote_user: ${{ secrets.REMOTE_USER }}
remote_key: ${{ secrets.REMOTE_KEY }}
remote_path: ${{ secrets.REMOTE_PATH }}
- name: deploy
env:
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
REMOTE_KEY: ${{ secrets.REMOTE_KEY }}
REMOTE_PATH: ${{ secrets.REMOTE_PATH }}
uses: actions/setup-node@v4
with:
node-version: "18"
- run: corepack enable
- run: |
ssh -i ${{ secrets.REMOTE_KEY }} -o StrictHostKeyChecking=no ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }} << 'EOF'
export REMOTE_PATH=$REMOTE_PATH
cd $REMOTE_PATH
rm -rf node_modules package-lock.json
npm install --legacy-per-deps
npx nuxt build
EOF