-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 2.01 KB
/
deploy-devel.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
on:
push:
branches:
- 'test'
name: 'Deploy staging instance'
jobs:
deploy:
name: 'deployment'
runs-on: self-hosted
steps:
- name: 'Checkout source code'
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: 'Install dependencies'
uses: eaudeweb/[email protected]
with:
dev: false
php: /usr/bin/php81
- name: 'Create release archive'
id: artifact
uses: eaudeweb/[email protected]
- name: 'Deploy release on the server'
uses: eaudeweb/[email protected]
with:
ssh_user: ${{ secrets.DEVEL_SSH_USER }}
ssh_host: ${{ secrets.DEVEL_SSH_HOST }}
ssh_key: ${{ secrets.DEVEL_SSH_KEY }}
release_id: ${{ steps.artifact.outputs.base }}
release_filename: ${{ steps.artifact.outputs.filename }}
project_dir: /var/www/html/devel.eu-parc.eu
artifacts_dir: /var/www/artifacts/devel.eu-parc.eu
settings_file: /var/www/config/devel.eu-parc.eu/settings.local.php
public_files_dir: /var/www/config/devel.eu-parc.eu/files
# env_file: /var/www/config/devel.eu-parc.eu/.env
robo_file: /var/www/config/devel.eu-parc.eu/robo.yml
database_dump_dir: /var/www/config/devel.eu-parc.eu/sync
artifacts_lifespan: 30
- name: 'Update the Drupal instance'
id: release
uses: eaudeweb/[email protected]
with:
path: /var/www/html/devel.eu-parc.eu
- name: 'Discord notification on failed deploy'
if: failure()
run: >
curl -X POST -F
"content=:octagonal_sign: ${{ github.repository }} failed to deploy release **${{ github.ref_name }}** on <https://devel.eu-parc.eu>.
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
${{ secrets.DISCORD_WEBHOOK }}