Skip to content

Commit

Permalink
CD: Add workflow for auto deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekashok1221 committed Aug 16, 2023
1 parent 7d97489 commit d9c7e0d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Deploy to VPS

on: workflow_call

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Trigger Watchtower on VPS
env:
WATCHTOWER_TOKEN: ${{ secrets.WATCHTOWER_TOKEN }}
run: |
curl -H "Authorization: Bearer $WATCHTOWER_TOKEN" https://watchtower.lnkshrt.xyz/v1/update
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ jobs:
with:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

deploy:
if: github.ref == 'refs/heads/main'
needs: build-and-push
uses: ./.github/workflows/deploy.yml
secrets: inherit

0 comments on commit d9c7e0d

Please sign in to comment.