-
Notifications
You must be signed in to change notification settings - Fork 77
41 lines (36 loc) · 1.2 KB
/
deploy.yml
File metadata and controls
41 lines (36 loc) · 1.2 KB
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 Production
on:
workflow_dispatch:
inputs:
image_tag:
description: 'Docker image tag to deploy (commit SHA or "latest")'
required: true
default: 'latest'
concurrency:
group: deploy-production
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy to VPS
uses: appleboy/ssh-action@v1.2.0
env:
IMAGE_TAG: ${{ github.event.inputs.image_tag }}
with:
host: ${{ vars.SSH_HOST }}
username: ${{ vars.SSH_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
port: ${{ vars.SSH_PORT }}
envs: IMAGE_TAG
command_timeout: 10m
script: |
/opt/ccsync/scripts/deploy.sh "$IMAGE_TAG"
- name: Deployment summary
run: |
echo "## Deployment Complete" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **Image tag:** ${{ github.event.inputs.image_tag }}" >> $GITHUB_STEP_SUMMARY
echo "- **Environment:** production" >> $GITHUB_STEP_SUMMARY
echo "- **Server:** https://taskwarrior-server.ccextractor.org" >> $GITHUB_STEP_SUMMARY