Skip to content

add search API

add search API #63

Workflow file for this run

name: CI
on: push
jobs:
# TODO: add static analysis job
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: go build -v ./...
test:
name: Test
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: go test -v ./...
deploy:
name: Deploy to Fly
needs: [build, test]
runs-on: ubuntu-latest
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Check which files changed
if: github.ref_name == 'main'
uses: dorny/paths-filter@v2
id: filter
with:
# TODO: exclude test files here
filters: |
flybuild:
- 'src/client/**'
- 'src/dblayer/**'
- 'src/html/**'
- 'src/server/**'
- 'src/util/**'
- 'fly.toml'
- 'go.mod'
- 'go.sum'
- 'main.go'
- name: flyctl deploy
shell: bash
run: |
set -x
FLAGS="--remote-only"
if [[ $GITHUB_REF_NAME != 'main' || ${{ steps.filter.outputs.flybuild }} == 'false' ]]; then
FLAGS="$FLAGS --build-only"
fi
flyctl deploy $FLAGS