Fixes to deployment
This commit is contained in:
2
.github/workflows/deploy_staging.yaml
vendored
2
.github/workflows/deploy_staging.yaml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
run: make test
|
||||
|
||||
- name: Build the binary
|
||||
run: make build
|
||||
run: make build SUFFIX=-staging-$GITHUB_SHA
|
||||
|
||||
- name: Deploy to Server
|
||||
env:
|
||||
|
||||
6
Makefile
6
Makefile
@@ -7,7 +7,7 @@ build:
|
||||
go mod tidy && \
|
||||
templ generate && \
|
||||
go generate && \
|
||||
go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
go build -ldflags="-w -s" -o ${BINARY_NAME}${SUFFIX}
|
||||
|
||||
dev:
|
||||
templ generate --watch &\
|
||||
@@ -19,11 +19,11 @@ tester:
|
||||
go run . --port 3232 --test --loglevel trace
|
||||
|
||||
test:
|
||||
rm -f **/.projectreshoot-test-database.db
|
||||
rm -f **/.projectreshoot-test-database.db && \
|
||||
go mod tidy && \
|
||||
templ generate && \
|
||||
go generate && \
|
||||
go test ./...
|
||||
go test ./middleware
|
||||
|
||||
clean:
|
||||
go clean
|
||||
|
||||
@@ -13,7 +13,7 @@ COMMIT_HASH=$1
|
||||
RELEASES_DIR="/home/deploy/releases/staging"
|
||||
DEPLOY_BIN="/home/deploy/staging/projectreshoot"
|
||||
SERVICE_NAME="staging.projectreshoot"
|
||||
BINARY_NAME="projectreshoot-${COMMIT_HASH}"
|
||||
BINARY_NAME="projectreshoot-staging-${COMMIT_HASH}"
|
||||
declare -a PORTS=("3005" "3006" "3007")
|
||||
|
||||
# Check if the binary exists
|
||||
|
||||
Reference in New Issue
Block a user