Skip to content

Commit 85b4df2

Browse files
committed
refactor: simplify startup script and enhance installation process
- Remove auto-update and environment variable handling from the startup script in egg-nemesis.json and egg-nemesis.yml for cleaner execution. - Update installation script to download release tarballs and verify checksums, ensuring file integrity before extraction. - Change GitHub branch variable to a tag variable for more flexible versioning during installations. - Improve dependency installation and environment setup in the installation script for better reliability.
1 parent 2be50b6 commit 85b4df2

File tree

4 files changed

+164
-145
lines changed

4 files changed

+164
-145
lines changed

.github/workflows/release.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22
24+
25+
- name: Setup PNPM
26+
uses: pnpm/action-setup@v4
27+
id: pnpm-install
28+
29+
- name: Get pnpm store directory
30+
id: pnpm-cache
31+
shell: bash
32+
run: |
33+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
34+
35+
- name: Setup pnpm cache
36+
uses: actions/cache@v4
37+
with:
38+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
39+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
40+
restore-keys: |
41+
${{ runner.os }}-pnpm-store-
42+
43+
- name: Install dependencies
44+
run: pnpm install
45+
46+
- name: Build project
47+
run: pnpm build
48+
49+
- name: Get version from tag
50+
id: get_version
51+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
52+
53+
- name: Create bot archive
54+
run: |
55+
# Create a directory for the release files
56+
mkdir -p release
57+
58+
# Create the bot.tar.gz archive excluding src and node_modules
59+
tar --exclude='./src' --exclude='./node_modules' --exclude='./.git' --exclude='./release' -czf release/bot.tar.gz .
60+
61+
# Create checksum file
62+
cd release
63+
sha256sum bot.tar.gz > checksum.txt
64+
cd ..
65+
66+
- name: Create Release
67+
id: create_release
68+
uses: softprops/action-gh-release@v1
69+
with:
70+
name: Release ${{ steps.get_version.outputs.VERSION }}
71+
tag_name: ${{ steps.get_version.outputs.VERSION }}
72+
draft: false
73+
prerelease: false
74+
files: |
75+
release/bot.tar.gz
76+
release/checksum.txt
77+
token: ${{ secrets.GITHUB_TOKEN }}
78+
79+
- name: Create or update 'latest' tag
80+
run: |
81+
git config --global user.name 'GitHub Actions'
82+
git config --global user.email 'actions@github.com'
83+
git tag -f latest
84+
git push -f origin latest

egg-nemesis.json

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"Node 20": "ghcr.io/parkervcp/yolks:nodejs_20"
1717
},
1818
"file_denylist": [],
19-
"startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then pnpm add -g ${NODE_PACKAGES}; fi; if [[ ! -d node_modules ]]; then pnpm install; fi; if [[ -f build.sh ]]; then chmod +x build.sh && ./build.sh; fi; if [[ ! -z ${ENVIRONMENT} ]]; then export NODE_ENV=${ENVIRONMENT}; fi; {{STARTUP_CMD}}",
19+
"startup": "{{STARTUP_CMD}}",
2020
"config": {
2121
"files": "{}",
2222
"startup": "{\r\n \"done\": \"Done!\"\r\n}",
@@ -25,7 +25,7 @@
2525
},
2626
"scripts": {
2727
"installation": {
28-
"script": "#!\/bin\/bash\r\n# Nemesis Node.js Template Install Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git curl\r\ncurl -fsSL https:\/\/get.pnpm.io\/install.sh | sh -\r\n\r\n# Set repository variables from egg\r\nGITHUB_USER=\"${GITHUB_USERNAME:-enum314}\"\r\nREPOSITORY=\"${GITHUB_REPOSITORY:-nemesis}\"\r\nBRANCH=\"${GITHUB_BRANCH:-main}\"\r\nTOKEN=\"${GITHUB_TOKEN}\"\r\n\r\n# Construct the repository URL\r\nif [ -z \"$TOKEN\" ]; then\r\n # Public repository\r\n SOURCE=\"https://github.com/${GITHUB_USER}/${REPOSITORY}.git\"\r\nelse\r\n # Private repository with token\r\n SOURCE=\"https://${TOKEN}@github.com/${GITHUB_USER}/${REPOSITORY}.git\"\r\nfi\r\n\r\nDEPLOY_DIR=\"/mnt/server\"\r\n\r\n# Make sure pterodactyl user can use pnpm\r\nexport PNPM_HOME=\"/usr/local/pnpm\"\r\nexport PATH=\"$PNPM_HOME:$PATH\"\r\npnpm config set store-dir /mnt/server/.pnpm-store\r\n\r\necho \"Cloning from: ${GITHUB_USER}/${REPOSITORY} (branch: ${BRANCH})\"\r\n\r\n# Clone or update repository\r\nif [ -d \"$DEPLOY_DIR/.git\" ]; then\r\n cd \"$DEPLOY_DIR\"\r\n git fetch origin\r\n git reset --hard \"origin/$BRANCH\"\r\nelse\r\n if [ -d \"$DEPLOY_DIR\" ]; then\r\n if [ \"$(ls -A \"$DEPLOY_DIR\")\" ]; then\r\n echo \"WARNING: Directory $DEPLOY_DIR is not empty\"\r\n if [ \"$WIPE\" = \"1\" ]; then\r\n echo \"Wiping directory...\"\r\n rm -rf \"$DEPLOY_DIR\"\r\n mkdir -p \"$DEPLOY_DIR\"\r\n fi\r\n fi\r\n else\r\n mkdir -p \"$DEPLOY_DIR\"\r\n fi\r\n \r\n cd /tmp\r\n git clone -b \"$BRANCH\" \"$SOURCE\" \"$DEPLOY_DIR\"\r\n cd \"$DEPLOY_DIR\"\r\nfi\r\n\r\n# Setup environment\r\nif [ ! -f \"$DEPLOY_DIR/.env\" ]; then\r\n if [ -f \"$DEPLOY_DIR/.env.example\" ]; then\r\n cp \"$DEPLOY_DIR/.env.example\" \"$DEPLOY_DIR/.env\"\r\n echo \"Created .env file from .env.example\"\r\n # Update port in .env to match Pterodactyl's allocated port\r\n sed -i \"s/PORT=.*/PORT={{server.build.default.port}}/g\" \"$DEPLOY_DIR/.env\"\r\n echo \"Updated PORT in .env to {{server.build.default.port}}\"\r\n else\r\n echo \"Warning: No .env.example file found. Creating minimal .env file.\"\r\n echo \"PORT={{server.build.default.port}}\" > \"$DEPLOY_DIR/.env\"\r\n echo \"NODE_ENV=production\" >> \"$DEPLOY_DIR/.env\"\r\n fi\r\nfi\r\n\r\n# Install dependencies\r\ncd \"$DEPLOY_DIR\"\r\npnpm install\r\n\r\n# Build the application\r\nif [ -f \"$DEPLOY_DIR/build.sh\" ]; then\r\n chmod +x \"$DEPLOY_DIR/build.sh\"\r\n ./build.sh\r\nelse\r\n pnpm build\r\nfi\r\n\r\necho \"Installation complete.\"\r\necho \"Project has been installed from ${GITHUB_USER}/${REPOSITORY}.\"\r\necho \"Server will start on port {{server.build.default.port}} as configured in .env\"",
28+
"script": "#!\/bin\/bash\r\n# Nemesis Node.js Template Install Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl wget tar jq file unzip make gcc g++ python3 python3-dev python3-pip libtool\r\ncurl -fsSL https:\/\/get.pnpm.io\/install.sh | sh -\r\n\r\n# Set repository variables from egg\r\nGITHUB_USER=\"${GITHUB_USERNAME:-enum314}\"\r\nREPOSITORY=\"${GITHUB_REPOSITORY:-nemesis}\"\r\nTAG=\"${GITHUB_TAG:-latest}\"\r\nTOKEN=\"${GITHUB_TOKEN}\"\r\n\r\nDEPLOY_DIR=\"/mnt/server\"\r\n\r\n# Make sure pterodactyl user can use pnpm\r\nexport PNPM_HOME=\"/usr/local/pnpm\"\r\nexport PATH=\"$PNPM_HOME:$PATH\"\r\npnpm config set store-dir /mnt/server/.pnpm-store\r\n\r\n# Ensure deployment directory exists\r\nif [ ! -d \"$DEPLOY_DIR\" ]; then\r\n mkdir -p \"$DEPLOY_DIR\"\r\nfi\r\n\r\n# Download release tarball and checksum file\r\ncd /tmp\r\n\r\n# Construct the base release URL with token if provided\r\nif [ -z \"$TOKEN\" ]; then\r\n # Public repository\r\n BASE_URL=\"https://github.com/${GITHUB_USER}/${REPOSITORY}/releases/download/${TAG}\"\r\n RELEASE_URL=\"${BASE_URL}/bot.tar.gz\"\r\n CHECKSUM_URL=\"${BASE_URL}/checksum.txt\"\r\nelse\r\n # Private repository with token\r\n BASE_URL=\"https://${TOKEN}@github.com/${GITHUB_USER}/${REPOSITORY}/releases/download/${TAG}\"\r\n RELEASE_URL=\"${BASE_URL}/bot.tar.gz\"\r\n CHECKSUM_URL=\"${BASE_URL}/checksum.txt\"\r\nfi\r\n\r\necho \"Downloading from: ${GITHUB_USER}/${REPOSITORY} (tag: ${TAG})\"\r\n\r\n# Download checksum file\r\necho \"Downloading checksum file...\"\r\nwget -q --show-progress --header=\"Authorization: token ${TOKEN}\" \"$CHECKSUM_URL\" -O checksum.txt\r\nif [ $? -ne 0 ]; then\r\n echo \"Failed to download checksum file. Aborting installation.\"\r\n exit 1\r\nfi\r\n\r\n# Download tarball\r\necho \"Downloading release tarball...\"\r\nwget -q --show-progress --header=\"Authorization: token ${TOKEN}\" \"$RELEASE_URL\" -O bot.tar.gz\r\nif [ $? -ne 0 ]; then\r\n echo \"Failed to download release tarball. Aborting installation.\"\r\n exit 1\r\nfi\r\n\r\n# Verify checksum\r\necho \"Verifying file integrity...\"\r\nCOMPUTED_CHECKSUM=$(sha256sum bot.tar.gz | awk '{print $1}')\r\nEXPECTED_CHECKSUM=$(cat checksum.txt | awk '{print $1}')\r\n\r\nif [ \"$COMPUTED_CHECKSUM\" != \"$EXPECTED_CHECKSUM\" ]; then\r\n echo \"Checksum verification failed!\"\r\n echo \"Expected: $EXPECTED_CHECKSUM\"\r\n echo \"Got: $COMPUTED_CHECKSUM\"\r\n echo \"The downloaded file may be corrupted or tampered with. Aborting installation.\"\r\n rm bot.tar.gz checksum.txt\r\n exit 1\r\nfi\r\n\r\necho \"Checksum verification successful!\"\r\n\r\n# Extract to server directory\r\necho \"Extracting files...\"\r\ntar -xzf bot.tar.gz -C \"$DEPLOY_DIR\"\r\nrm bot.tar.gz checksum.txt\r\n\r\n# Setup environment file\r\nif [ ! -f \"$DEPLOY_DIR/.env\" ]; then\r\n if [ -f \"$DEPLOY_DIR/.env.example\" ]; then\r\n cp \"$DEPLOY_DIR/.env.example\" \"$DEPLOY_DIR/.env\"\r\n echo \"Created .env file from .env.example\"\r\n # Update port in .env to match Pterodactyl's allocated port\r\n sed -i \"s/PORT=.*/PORT={{server.build.default.port}}/g\" \"$DEPLOY_DIR/.env\"\r\n echo \"Updated PORT in .env to {{server.build.default.port}}\"\r\n else\r\n echo \"Warning: No .env.example file found. Creating minimal .env file.\"\r\n echo \"PORT={{server.build.default.port}}\" > \"$DEPLOY_DIR/.env\"\r\n echo \"NODE_ENV=production\" >> \"$DEPLOY_DIR/.env\"\r\n fi\r\nfi\r\n\r\necho \"Release has been installed from ${GITHUB_USER}/${REPOSITORY} (tag: ${TAG}).\"\r\necho \"Server will start on port {{server.build.default.port}} as configured in .env\"",
2929
"container": "ghcr.io/parkervcp/installer:debian",
3030
"entrypoint": "bash"
3131
}
@@ -40,45 +40,9 @@
4040
"user_editable": true,
4141
"rules": "required|string"
4242
},
43-
{
44-
"name": "Auto Update",
45-
"description": "Pull the latest changes from Git on startup.",
46-
"env_variable": "AUTO_UPDATE",
47-
"default_value": "1",
48-
"user_viewable": true,
49-
"user_editable": true,
50-
"rules": "required|boolean"
51-
},
52-
{
53-
"name": "Node Environment",
54-
"description": "The Node environment to use.",
55-
"env_variable": "ENVIRONMENT",
56-
"default_value": "production",
57-
"user_viewable": true,
58-
"user_editable": true,
59-
"rules": "required|string|in:production,development,staging,test"
60-
},
61-
{
62-
"name": "Additional Node Packages",
63-
"description": "Additional Node packages to install globally. Separate with spaces.",
64-
"env_variable": "NODE_PACKAGES",
65-
"default_value": "",
66-
"user_viewable": true,
67-
"user_editable": true,
68-
"rules": "nullable|string"
69-
},
70-
{
71-
"name": "Wipe Directory on Install",
72-
"description": "Whether to wipe the directory when installing.",
73-
"env_variable": "WIPE",
74-
"default_value": "0",
75-
"user_viewable": true,
76-
"user_editable": true,
77-
"rules": "required|boolean"
78-
},
7943
{
8044
"name": "GitHub Username",
81-
"description": "The GitHub username for the repository to clone (leave default for template repository).",
45+
"description": "The GitHub username for the repository.",
8246
"env_variable": "GITHUB_USERNAME",
8347
"default_value": "enum314",
8448
"user_viewable": true,
@@ -87,18 +51,18 @@
8751
},
8852
{
8953
"name": "GitHub Repository",
90-
"description": "The GitHub repository name to clone (leave default for template repository).",
54+
"description": "The GitHub repository name.",
9155
"env_variable": "GITHUB_REPOSITORY",
9256
"default_value": "nemesis",
9357
"user_viewable": true,
9458
"user_editable": true,
9559
"rules": "required|string"
9660
},
9761
{
98-
"name": "GitHub Branch",
99-
"description": "The branch to clone from the repository.",
100-
"env_variable": "GITHUB_BRANCH",
101-
"default_value": "main",
62+
"name": "GitHub Tag",
63+
"description": "The release tag to install (use 'latest' for the most recent release).",
64+
"env_variable": "GITHUB_TAG",
65+
"default_value": "latest",
10266
"user_viewable": true,
10367
"user_editable": true,
10468
"rules": "required|string"

egg-nemesis.yml

Lines changed: 67 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,7 @@ exported_at: "2025-03-26T00:00:00+00:00"
55
docker_image: ghcr.io/parkervcp/yolks:nodejs_22
66
features:
77
- docker
8-
startup: |
9-
if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == "1" ]]; then
10-
git pull;
11-
fi;
12-
if [[ ! -z ${NODE_PACKAGES} ]]; then
13-
pnpm add -g ${NODE_PACKAGES};
14-
fi;
15-
if [[ ! -d node_modules ]]; then
16-
pnpm install;
17-
fi;
18-
if [[ -f build.sh ]]; then
19-
chmod +x build.sh && ./build.sh;
20-
fi;
21-
if [[ ! -z ${ENVIRONMENT} ]]; then
22-
export NODE_ENV=${ENVIRONMENT};
23-
fi;
24-
{{STARTUP_CMD}}
8+
startup: "{{STARTUP_CMD}}"
259
config:
2610
files: {}
2711
startup:
@@ -36,52 +20,24 @@ variables:
3620
user_viewable: true
3721
user_editable: true
3822
rules: required|string
39-
- name: Auto Update
40-
description: Pull the latest changes from Git on startup.
41-
env_variable: AUTO_UPDATE
42-
default_value: "1"
43-
user_viewable: true
44-
user_editable: true
45-
rules: required|boolean
46-
- name: Node Environment
47-
description: The Node environment to use.
48-
env_variable: ENVIRONMENT
49-
default_value: production
50-
user_viewable: true
51-
user_editable: true
52-
rules: required|string|in:production,development,staging,test
53-
- name: Additional Node Packages
54-
description: Additional Node packages to install globally. Separate with spaces.
55-
env_variable: NODE_PACKAGES
56-
default_value: ""
57-
user_viewable: true
58-
user_editable: true
59-
rules: nullable|string
60-
- name: Wipe Directory on Install
61-
description: Whether to wipe the directory when installing.
62-
env_variable: WIPE
63-
default_value: "0"
64-
user_viewable: true
65-
user_editable: true
66-
rules: required|boolean
6723
- name: GitHub Username
68-
description: The GitHub username for the repository to clone (leave default for template repository).
24+
description: The GitHub username for the repository.
6925
env_variable: GITHUB_USERNAME
7026
default_value: "enum314"
7127
user_viewable: true
7228
user_editable: true
7329
rules: required|string
7430
- name: GitHub Repository
75-
description: The GitHub repository name to clone (leave default for template repository).
31+
description: The GitHub repository name.
7632
env_variable: GITHUB_REPOSITORY
7733
default_value: "nemesis"
7834
user_viewable: true
7935
user_editable: true
8036
rules: required|string
81-
- name: GitHub Branch
82-
description: The branch to clone from the repository.
83-
env_variable: GITHUB_BRANCH
84-
default_value: "main"
37+
- name: GitHub Tag
38+
description: The release tag to install (use 'latest' for the most recent release).
39+
env_variable: GITHUB_TAG
40+
default_value: "latest"
8541
user_viewable: true
8642
user_editable: true
8743
rules: required|string
@@ -99,58 +55,83 @@ install:
9955
#
10056
# Server Files: /mnt/server
10157
apt update
102-
apt install -y git curl
58+
apt install -y curl wget tar jq file unzip make gcc g++ python3 python3-dev python3-pip libtool
10359
curl -fsSL https://get.pnpm.io/install.sh | sh -
10460
10561
# Set repository variables from egg
10662
GITHUB_USER="${GITHUB_USERNAME:-enum314}"
10763
REPOSITORY="${GITHUB_REPOSITORY:-nemesis}"
108-
BRANCH="${GITHUB_BRANCH:-main}"
64+
TAG="${GITHUB_TAG:-latest}"
10965
TOKEN="${GITHUB_TOKEN}"
11066
111-
# Construct the repository URL
112-
if [ -z "$TOKEN" ]; then
113-
# Public repository
114-
SOURCE="https://github.com/${GITHUB_USER}/${REPOSITORY}.git"
115-
else
116-
# Private repository with token
117-
SOURCE="https://${TOKEN}@github.com/${GITHUB_USER}/${REPOSITORY}.git"
118-
fi
119-
12067
DEPLOY_DIR="/mnt/server"
12168
12269
# Make sure pterodactyl user can use pnpm
12370
export PNPM_HOME="/usr/local/pnpm"
12471
export PATH="$PNPM_HOME:$PATH"
12572
pnpm config set store-dir /mnt/server/.pnpm-store
12673
127-
echo "Cloning from: ${GITHUB_USER}/${REPOSITORY} (branch: ${BRANCH})"
74+
# Ensure deployment directory exists
75+
if [ ! -d "$DEPLOY_DIR" ]; then
76+
mkdir -p "$DEPLOY_DIR"
77+
fi
78+
79+
# Download release tarball and checksum file
80+
cd /tmp
12881
129-
# Clone or update repository
130-
if [ -d "$DEPLOY_DIR/.git" ]; then
131-
cd "$DEPLOY_DIR"
132-
git fetch origin
133-
git reset --hard "origin/$BRANCH"
82+
# Construct the base release URL with token if provided
83+
if [ -z "$TOKEN" ]; then
84+
# Public repository
85+
BASE_URL="https://github.com/${GITHUB_USER}/${REPOSITORY}/releases/download/${TAG}"
86+
RELEASE_URL="${BASE_URL}/bot.tar.gz"
87+
CHECKSUM_URL="${BASE_URL}/checksum.txt"
13488
else
135-
if [ -d "$DEPLOY_DIR" ]; then
136-
if [ "$(ls -A "$DEPLOY_DIR")" ]; then
137-
echo "WARNING: Directory $DEPLOY_DIR is not empty"
138-
if [ "$WIPE" = "1" ]; then
139-
echo "Wiping directory..."
140-
rm -rf "$DEPLOY_DIR"
141-
mkdir -p "$DEPLOY_DIR"
142-
fi
143-
fi
144-
else
145-
mkdir -p "$DEPLOY_DIR"
146-
fi
147-
148-
cd /tmp
149-
git clone -b "$BRANCH" "$SOURCE" "$DEPLOY_DIR"
150-
cd "$DEPLOY_DIR"
89+
# Private repository with token
90+
BASE_URL="https://${TOKEN}@github.com/${GITHUB_USER}/${REPOSITORY}/releases/download/${TAG}"
91+
RELEASE_URL="${BASE_URL}/bot.tar.gz"
92+
CHECKSUM_URL="${BASE_URL}/checksum.txt"
93+
fi
94+
95+
echo "Downloading from: ${GITHUB_USER}/${REPOSITORY} (tag: ${TAG})"
96+
97+
# Download checksum file
98+
echo "Downloading checksum file..."
99+
wget -q --show-progress --header="Authorization: token ${TOKEN}" "$CHECKSUM_URL" -O checksum.txt
100+
if [ $? -ne 0 ]; then
101+
echo "Failed to download checksum file. Aborting installation."
102+
exit 1
103+
fi
104+
105+
# Download tarball
106+
echo "Downloading release tarball..."
107+
wget -q --show-progress --header="Authorization: token ${TOKEN}" "$RELEASE_URL" -O bot.tar.gz
108+
if [ $? -ne 0 ]; then
109+
echo "Failed to download release tarball. Aborting installation."
110+
exit 1
151111
fi
152112
153-
# Setup environment
113+
# Verify checksum
114+
echo "Verifying file integrity..."
115+
COMPUTED_CHECKSUM=$(sha256sum bot.tar.gz | awk '{print $1}')
116+
EXPECTED_CHECKSUM=$(cat checksum.txt | awk '{print $1}')
117+
118+
if [ "$COMPUTED_CHECKSUM" != "$EXPECTED_CHECKSUM" ]; then
119+
echo "Checksum verification failed!"
120+
echo "Expected: $EXPECTED_CHECKSUM"
121+
echo "Got: $COMPUTED_CHECKSUM"
122+
echo "The downloaded file may be corrupted or tampered with. Aborting installation."
123+
rm bot.tar.gz checksum.txt
124+
exit 1
125+
fi
126+
127+
echo "Checksum verification successful!"
128+
129+
# Extract to server directory
130+
echo "Extracting files..."
131+
tar -xzf bot.tar.gz -C "$DEPLOY_DIR"
132+
rm bot.tar.gz checksum.txt
133+
134+
# Setup environment file
154135
if [ ! -f "$DEPLOY_DIR/.env" ]; then
155136
if [ -f "$DEPLOY_DIR/.env.example" ]; then
156137
cp "$DEPLOY_DIR/.env.example" "$DEPLOY_DIR/.env"
@@ -165,18 +146,5 @@ install:
165146
fi
166147
fi
167148
168-
# Install dependencies
169-
cd "$DEPLOY_DIR"
170-
pnpm install
171-
172-
# Build the application
173-
if [ -f "$DEPLOY_DIR/build.sh" ]; then
174-
chmod +x "$DEPLOY_DIR/build.sh"
175-
./build.sh
176-
else
177-
pnpm build
178-
fi
179-
180-
echo "Installation complete."
181-
echo "Project has been installed from ${GITHUB_USER}/${REPOSITORY}."
149+
echo "Release has been installed from ${GITHUB_USER}/${REPOSITORY} (tag: ${TAG})."
182150
echo "Server will start on port {{server.build.default.port}} as configured in .env"

0 commit comments

Comments
 (0)