-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 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
40
41
name: Deploy to dev
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install dependencies
run: |
cd wp-content/themes/mediasanctuary
npm install
- name: Build
run: |
cd wp-content/themes/mediasanctuary
npm run build
- name: Sync
env:
dest: "[email protected]:/home/members/nyma/sites/dev.mediasanctuary.org/web/wp-content/"
run: |
echo "${{secrets.DEPLOY_KEY}}" > deploy_key
chmod 600 ./deploy_key
rsync \
--rsh='ssh -i ./deploy_key -o StrictHostKeyChecking=no' \
--delete \
--checksum \
--recursive \
--verbose \
--human-readable \
--filter='P uploads' \
--exclude wp-content/uploads \
--exclude deploy_key \
./wp-content/ ${{env.dest}}
rm deploy_key