Skip to content

[Docs]: update readme 2 (#47) #48

[Docs]: update readme 2 (#47)

[Docs]: update readme 2 (#47) #48

Workflow file for this run

name: ci-cd
on:
push:
branches:
- main
permissions:
contents: read
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.21"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Install dependencies
run: go get .
- name: Build
run: go build -race -v ./...
- name: Test
run: go test -race -v ./...
deploy:
runs-on: ubuntu-latest
needs: [lint, build]
steps:
- uses: actions/checkout@v3
- name: Setup GCP Auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA }}
- name: SSH into instance and run deploy command
uses: google-github-actions/ssh-compute@v1
with:
instance_name: fluentify-server
zone: us-west4-b
user: ${{ secrets.GCP_SSH_USER }}
ssh_private_key: ${{ secrets.GCP_SSH_PRIVATE_KEY }}
command: cd ~/fluentify-server && pwd && sh ./bin/deploy.sh