-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (68 loc) · 2.13 KB
/
deploy.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Deploy to production
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install pnpm
run: npm install -g pnpm
- run: pnpm install
- name: Build Projects
run: pnpm -r run build
- name: List All Files After Build
run: find . -type f -print
- name: List Directories After Build
run: find . -type d -print
- name: Verify Specific Build Outputs
run: |
echo "Listing build directory for next-auth:"
ls -la ./apps/next-auth
echo "Listing build directory for teste:"
ls -la ./apps/teste
echo "Listing dist directories in entire repository:"
find . -type d -name dist
deploy:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
app:
- name: 'next-auth'
path: 'apps/next-auth/dist/'
remote_path: '/var/www/guias/next-auth/'
- name: 'teste'
path: 'apps/teste/dist/'
remote_path: '/var/www/guias/teste/'
# Add more apps as needed
steps:
- name: List All Files before checkout
run: find . -type f -print
- name: Checkout code
uses: actions/checkout@v4
- name: List All Files After checkout
run: find . -type f -print
- name: Print working directory and list files
run: |
echo "Working directory:"
pwd
echo "Content of repository root:"
ls -la
- name: Print matrix app path and list files in it
run: |
echo "Matrix app path: ${{ matrix.app.path }}"
echo "Contents of the path:"
ls -la ${{ matrix.app.path }}
- name: Deploy with rsync
uses: burnett01/[email protected]
with:
switches: -avzr --quiet --delete
path: ${{ matrix.app.path }}
remote_path: ${{ matrix.app.remote_path }}
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.SSH_KEY }}