-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 1.7 KB
/
wpengine-deploy-root.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
name: Deploy root to WP Engine
on:
workflow_call:
inputs:
env_install:
type: string
required: true
env_ssh_host:
type: string
required: true
secrets:
known_hosts:
required: true
wpengine_ssh_key_private:
required: true
jobs:
backup:
runs-on: ubuntu-latest
if: false
steps:
- run: echo "Placeholder for unnecessary backup job"
deploy:
runs-on: ubuntu-latest
needs: [ backup ]
if: always()
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: benoitchantre/[email protected]
with:
private-key: ${{ secrets.wpengine_ssh_key_private }}
private-key-name: deploy-wpengine
known-hosts: ${{ secrets.known_hosts }}
- run: |
rsync -chaviP --stats --no-times --no-perms \
-e 'ssh -i ~/.ssh/deploy-wpengine' \
--exclude /.git/ \
--exclude /.github/ \
--exclude /.gitignore \
--exclude /.ssh/ \
--exclude /.editorconfig \
--exclude /wp-config-sample.php \
--exclude /wp-content/ \
--exclude /dev/ \
--exclude /composer.json \
--exclude /composer.lock \
--exclude /phpcs.xml \
--exclude /phpstan-baseline.neon \
--exclude /phpstan.neon \
--exclude /vendor \
--exclude /node_modules \
--exclude /.nvmrc \
--exclude /.stylelintignore \
--exclude /.stylelintrc.json \
--exclude /package.json \
--exclude /package-lock.json \
./ "${{ inputs.env_install }}@${{ inputs.env_ssh_host }}:/sites/${{ inputs.env_install }}/"