Skip to content

Commit

Permalink
Merge pull request #42 from idkbrowby/automatic-build
Browse files Browse the repository at this point in the history
CD: Add workflow for auto deployment.
  • Loading branch information
anand2312 authored Aug 16, 2023
2 parents 40bde19 + d9c7e0d commit 953ee6d
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 953ee6d

Please sign in to comment.