a0b22059a0
All checks were successful
Build and copy to prod / build-and-copy (push) Successful in 35s
22 lines
610 B
YAML
22 lines
610 B
YAML
name: Build and copy to prod
|
|
on:
|
|
push:
|
|
jobs:
|
|
build-and-copy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.22
|
|
- name: Build binary
|
|
run: go build -o dist/oopsie
|
|
- name: Install SSH Key
|
|
uses: shimataro/ssh-key-action@v2
|
|
with:
|
|
key: ${{ secrets.SSH_KEY }}
|
|
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
|
|
- name: Copy to prod
|
|
run: scp -rp dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:oopsie/ |