diff --git a/.eslintignore b/.eslintignore index 5afa2a15..c0994b84 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,4 +2,5 @@ node_modules output jest.config.js .eslintrc.js -ecosystem.config.js \ No newline at end of file +ecosystem.config.js +dist \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5e69d031..8535c902 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,7 +4,6 @@ name: Deploy to server on: - workflow_dispatch: release: types: [published] @@ -20,6 +19,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Tag published version + run: | + git tag -a latest -f -m "Published version latest" ${GITHUB_SHA} + git push origin latest + - name: Install exiftool run: sudo apt-get install -y exiftool diff --git a/ecosystem.config.js b/ecosystem.config.js index fa0a4c7a..b6dad362 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -2,8 +2,8 @@ module.exports = { apps: [ { name: "cyclists_of_msn", - script: "node_modules/.bin/ts-node", - args: "src/server.ts", + script: "node", + args: "dist/server.js", log_date_format: "YYYY-MM-DD HH:mm Z", }, ], diff --git a/package-lock.json b/package-lock.json index b95f0208..022bd569 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7710,10 +7710,13 @@ } }, "node_modules/get-tsconfig": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.5.0.tgz", - "integrity": "sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", + "integrity": "sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==", "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, "funding": { "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } @@ -11387,6 +11390,15 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/resolve.exports": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", diff --git a/package.json b/package.json index a9bcc82a..f173c802 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "start": "ts-node src/server.ts", "build": "tsc --noEmit", + "dist": "tsc", "dev": "ts-node-dev --inspect -- src/server.ts", "migration:imagedescription": "ts-node src/tools/updatefilemetadata.ts", "pm2-start": "pm2 startOrRestart ecosystem.config.js", diff --git a/tsconfig.json b/tsconfig.json index f5578f3a..6aa1da58 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,9 +4,10 @@ "compilerOptions": { "preserveConstEnums": true, "noFallthroughCasesInSwitch": true, - "emitDecoratorMetadata": true, "experimentalDecorators": true, + "emitDecoratorMetadata": true, "noImplicitOverride": true, - "typeRoots": ["@types", "./node_modules/@types"], + "outDir": "dist", + "typeRoots": ["@types", "./node_modules/@types"] } }