2
.github/workflows/deploy_staging.yaml
vendored
2
.github/workflows/deploy_staging.yaml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
- name: Build the binary
|
- name: Build the binary
|
||||||
run: make build
|
run: make build SUFFIX=-staging-$GITHUB_SHA
|
||||||
|
|
||||||
- name: Deploy to Server
|
- name: Deploy to Server
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -7,7 +7,7 @@ build:
|
|||||||
go mod tidy && \
|
go mod tidy && \
|
||||||
templ generate && \
|
templ generate && \
|
||||||
go generate && \
|
go generate && \
|
||||||
go build -ldflags="-w -s" -o ${BINARY_NAME}
|
go build -ldflags="-w -s" -o ${BINARY_NAME}${SUFFIX}
|
||||||
|
|
||||||
dev:
|
dev:
|
||||||
templ generate --watch &\
|
templ generate --watch &\
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ COMMIT_HASH=$1
|
|||||||
RELEASES_DIR="/home/deploy/releases/staging"
|
RELEASES_DIR="/home/deploy/releases/staging"
|
||||||
DEPLOY_BIN="/home/deploy/staging/projectreshoot"
|
DEPLOY_BIN="/home/deploy/staging/projectreshoot"
|
||||||
SERVICE_NAME="staging.projectreshoot"
|
SERVICE_NAME="staging.projectreshoot"
|
||||||
BINARY_NAME="projectreshoot-${COMMIT_HASH}"
|
BINARY_NAME="projectreshoot-staging-${COMMIT_HASH}"
|
||||||
declare -a PORTS=("3005" "3006" "3007")
|
declare -a PORTS=("3005" "3006" "3007")
|
||||||
|
|
||||||
# Check if the binary exists
|
# Check if the binary exists
|
||||||
|
|||||||
Reference in New Issue
Block a user