-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (50 loc) · 1.92 KB
/
deploy-manual-production.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
name: Manually deploy to production
on:
workflow_dispatch:
inputs:
TAG:
description: 'Version to deploy, can be a tag, branch, commit or empty for latest'
required: false
type: string
default: ''
PHP_VERSION:
description: 'The PHP version to use'
required: false
type: string
default: '8.2'
BUILD_FOR_DEPLOY:
description: 'Whether to build for deployment immediately or to keep developer tools'
required: false
type: boolean
default: false
jobs:
code-checkout:
uses: ./.github/workflows/checkout-and-build.yml
with:
tag: ${{ inputs.TAG }}
PHP_VERSION: ${{ inputs.PHP_VERSION }}
BUILD_FOR_DEPLOY: ${{ inputs.BUILD_FOR_DEPLOY }}
ARTIFACT_NAME: 'compressed-code-artifact'
secrets: inherit
deploy:
uses: 'dekodeinteraktiv/github-actions/.github/workflows/deploy-to-server.yml@main'
needs: [code-checkout]
with:
ARTIFACT_NAME: 'compressed-code-artifact'
RSYNC_FILTER_FILE: './tools/github/rsync-file-filter.rules'
secrets:
SERVER_USERNAME: ${{ secrets.PROD_DEPLOYMENT_USERNAME }}
SERVER_HOSTNAME: ${{ secrets.PROD_DEPLOYMENT_HOSTNAME }}
DEPLOYMENT_PATH: ${{ secrets.PROD_DEPLOYMENT_PATH }}
SERVER_PRIVATE_KEY: ${{ secrets.ACTIONS_DEPLOYMENT_KEY_ED25519_BASE64 }}
SERVER_HOSTKEY: ${{ secrets.PROD_DEPLOYMENT_HOSTKEY }}
cleanup:
runs-on: ubuntu-latest
needs: [deploy]
steps:
# Delete artifacts after use.
- uses: geekyeggo/delete-artifact@v2
with:
failOnError: false
name: 'compressed-code-artifact'
useGlob: false