generated from slothiestudio/kirby-template-slothie-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.49 KB
/
preview.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
on:
push:
branches: main
name: PREVIEW Deploy website on push
jobs:
web-deploy:
name: Deploy
runs-on: [ ubuntu-latest ]
steps:
- name: Get latest code
uses: actions/checkout@v4
- name: Install composer dependencies
uses: php-actions/composer@v6
with:
php_version: "8.2"
php_extensions: gd ctype curl mbstring zip
version: 2.x
- name: Install npm dependencies
uses: actions/setup-node@v4
with:
node-version: '20'
- run: |
npm ci
npm run build
- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.PREVIEW_SERVER_URL }}
username: ${{ secrets.PREVIEW_USERNAME }}
password: ${{ secrets.PREVIEW_PASSWORD }}
server-dir: ${{ secrets.PREVIEW_SERVER_DIRECTORY }}
exclude: |
.htaccess
**/.git*
**/.git/**
**/.github/**
**/src/**
**/node_modules/**
**/content/**
# - name: SSH into the server and remove cache folder
# uses: appleboy/ssh-action@v1.0.3
# with:
# host: ${{ secrets.previewcostructserverurl }}
# username: ${{ secrets.previewcostructusername }}
# password: ${{ secrets.previewcostructpassword }}
# script: |
# cd .${{ secrets.previewcostructserverdirectory }}/storage/cache/
# rm -rf ./preview.costruct.ch