Skip to content

Commit

Permalink
add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-streltsov committed Oct 20, 2024
1 parent 352bd3a commit 0b783dd
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy

on:
push:
branches:
- master
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.22.4'

- name: Run tests
run: go test ./...

deploy:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Deploy to VPS
uses: will-lynas/[email protected]
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
branch-name: master

0 comments on commit 0b783dd

Please sign in to comment.