Skip to content

Build and Deploy on Production #8

Build and Deploy on Production

Build and Deploy on Production #8

Workflow file for this run

name: Build and Deploy on Production
on:
workflow_run:
workflows: [ Run unit tests ]
branches: [ master ]
types:
- completed
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.21
id: go
- name: Check out code
uses: actions/checkout@v4
- name: Create empty env file
run: touch app.env
- name: Build
run: make build
- name: Deploy to Server
uses: burnett01/[email protected]
with:
switches: -avzr --delete --include="main" --include="db" --include="db/migration" --exclude="db/*" --exclude="*"
path: .
remote_path: /home/arman
remote_host: ${{ secrets.HOST }}
remote_port: ${{ secrets.PORT }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}