feat: update workflows

* build images with automatic tags
* separate staging and production deployment
* reuse workflows
This commit is contained in:
wancat committed 2023-11-18 18:05:42 +08:00
1 parent 81581c4635
commit 7d25c7efaa
8 files changed
+197 -118

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
name: Production Deployment
on:
push:
tags:
- 'v*'
jobs:
ci-checks:
uses: ./.github/workflows/ci-checks.yml
build:
needs: ci-checks
uses: ./.github/workflows/build.yml
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: SSH into server and update service
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}