adding prod deploy
This commit is contained in:
parent
6ce1935dea
commit
ef4d16c0ae
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@ -6,6 +6,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Build & Unit Test
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -29,6 +30,7 @@ jobs:
|
|||||||
build-Docker:
|
build-Docker:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Build Containers
|
||||||
needs: [build] # for ignoring bad builds
|
needs: [build] # for ignoring bad builds
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
||||||
|
|
||||||
@ -52,3 +54,26 @@ jobs:
|
|||||||
sarsoo/overflow:latest
|
sarsoo/overflow:latest
|
||||||
sarsoo/overflow:${{ github.ref_name }}
|
sarsoo/overflow:${{ github.ref_name }}
|
||||||
file: Dockerfile
|
file: Dockerfile
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Deploy
|
||||||
|
needs: [build-Docker] # for ignoring bad builds
|
||||||
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
|
||||||
|
environment:
|
||||||
|
name: prod
|
||||||
|
url: https://overflow.sarsoo.xyz
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Tailscale
|
||||||
|
uses: tailscale/github-action@v2
|
||||||
|
with:
|
||||||
|
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
|
||||||
|
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
|
||||||
|
tags: tag:ci
|
||||||
|
version: 1.68.1
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: ssh -o StrictHostKeyChecking=no ${{ secrets.TS_SSH }} -t "cd overflow/ && docker compose up -d --pull always"
|
Loading…
Reference in New Issue
Block a user