Skip to content

Commit d710d58

Browse files
committed
feat: add tsc-alias and update scripts
1 parent 1f15d6a commit d710d58

7 files changed

Lines changed: 249 additions & 13 deletions

File tree

.github/workflows/deploy-commands.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ jobs:
3232
# Run deploy script inside the already running Docker container
3333
# .env file should already exist from main deployment
3434
echo "Deploying Discord commands..."
35-
docker compose --profile prod exec bot-prod node dist/util/deploy.js
35+
docker compose --profile prod exec bot-prod node dist/scripts/deploy-commands.js
3636
3737
echo "Discord commands deployment completed!"

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: npm run typecheck
4040

4141
- name: Build
42-
run: npm run build:ci
42+
run: npm run build
4343

4444
- name: Test
4545
run: npm run test:ci

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ FROM deps-dev AS build
2727

2828
COPY . .
2929

30-
RUN pnpm run build:ci
30+
RUN pnpm run build
3131

3232
# Production stage - Minimal runtime image
3333
FROM base AS production
@@ -44,6 +44,9 @@ COPY package.json ./
4444
# Copy environment config file (public, non-secret)
4545
COPY .env.production ./
4646

47+
# Copy static assets (guides, tips, etc.) from the build stage
48+
COPY --from=build /app/assets ./assets
49+
4750
# Create data directory and set permissions for node user
4851
RUN mkdir -p /app/data && chown -R node:node /app/data
4952

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@
44
"description": "Web Dev & Web Design discord bot",
55
"type": "module",
66
"scripts": {
7-
"build:ci": "npm run build:ts && npm run build:copy",
8-
"build:dev": "pnpm run build:ts && pnpm run build:copy",
9-
"build:ts": "tsup",
10-
"build:copy": "node scripts/copy-assets.js",
7+
"build": "tsup && tsc-alias",
118
"start": "node dist/index.js",
129
"dev": "tsx watch src/index.ts",
13-
"deploy": "tsx src/util/deploy.ts",
10+
"deploy": "tsx src/scripts/deploy-commands.ts",
1411
"docker:build": "NODE_VERSION=$(cat .nvmrc | tr -d 'v') docker compose build",
1512
"docker:dev": "NODE_VERSION=$(cat .nvmrc | tr -d 'v') docker compose --profile dev up",
1613
"docker:prod": "NODE_VERSION=$(cat .nvmrc | tr -d 'v') docker compose --profile prod up -d",
@@ -21,8 +18,8 @@
2118
"test:ci": "NODE_ENV=test node --test dist/**/*.test.js",
2219
"prepare": "husky",
2320
"pre-commit": "lint-staged",
24-
"sync-guides": "tsx scripts/sync-guides.js",
25-
"sync-guides:init": "tsx scripts/sync-guides.js --initialize"
21+
"sync-guides": "tsx src/scripts/sync-guides.ts",
22+
"sync-guides:init": "tsx src/scripts/sync-guides.ts --initialize"
2623
},
2724
"keywords": [],
2825
"author": "",
@@ -40,6 +37,7 @@
4037
"@types/node-cron": "^3.0.11",
4138
"husky": "^9.1.7",
4239
"lint-staged": "^16.2.1",
40+
"tsc-alias": "^1.8.17",
4341
"tsup": "^8.5.0",
4442
"tsx": "^4.20.6"
4543
},

0 commit comments

Comments
 (0)