Skip to content
Snippets Groups Projects
Commit 601e3b19 authored by Yusuf Akgül's avatar Yusuf Akgül :hatching_chick:
Browse files

fix ci/cd + deploy to vercel

parent f3e32b2b
No related branches found
No related tags found
No related merge requests found
Pipeline #34298 passed
...@@ -25,26 +25,35 @@ stages: # List of stages for jobs, and their order of execution ...@@ -25,26 +25,35 @@ stages: # List of stages for jobs, and their order of execution
build-job: # This job runs in the build stage, which runs first. build-job: # This job runs in the build stage, which runs first.
stage: build stage: build
script: script:
- npm i - echo "Building application..."
#- npm run build # needs automatic api key binding/refresh - npm install
- npm run build
- echo "Application successfully built."
unit-test-job: # This job runs in the test stage. unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully. stage: test # It only starts when the job in the build stage completes successfully.
script: script:
- echo "Running unit tests... This will take about 10 seconds." - echo "Running unit tests... This will take about 10 seconds."
- sleep 10 - sleep 1
- echo "Code coverage is 90%" - echo "Code coverage is 90%"
lint-test-job: # This job also runs in the test stage. lint-test-job: # This job also runs in the test stage.
stage: test # It can run at the same time as unit-test-job (in parallel). stage: test # It can run at the same time as unit-test-job (in parallel).
script: script:
- echo "Linting code... This will take about 10 seconds." - echo "Linting code... This will take about 10 seconds."
- sleep 10 - sleep 1
- echo "No lint issues found." - echo "No lint issues found."
deploy-job: # This job runs in the deploy stage. deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully. stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
environment: production environment: production
only:
- main
script: script:
- echo "Deploying application..." - echo "Deploying application..."
- npm install --foreground-scripts # without this= error
- npm install --global vercel
- vercel pull --yes --environment=production --token=$VERCEL_TOKEN
- vercel build --prod --token=$VERCEL_TOKEN
- vercel deploy --prebuilt --prod --token=$VERCEL_TOKEN
- echo "Application successfully deployed." - echo "Application successfully deployed."
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
"name": "project_ss23_gameunity", "name": "project_ss23_gameunity",
"version": "0.2.0", "version": "0.2.0",
"dependencies": { "dependencies": {
"@clerk/nextjs": "^4.18.2", "@clerk/nextjs": "^4.18.4",
"@prisma/client": "^4.14.1", "@prisma/client": "^4.14.1",
"@radix-ui/react-dropdown-menu": "^2.0.4", "@radix-ui/react-dropdown-menu": "^2.0.4",
"@radix-ui/react-slot": "^1.0.1", "@radix-ui/react-slot": "^1.0.1",
"@tanstack/react-query": "^4.29.7", "@tanstack/react-query": "^4.29.7",
"class-variance-authority": "^0.6.0", "class-variance-authority": "^0.6.0",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"lucide-react": "^0.220.0", "lucide-react": "^0.221.0",
"next": "13.4.3", "next": "13.4.3",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
"react": "18.2.0", "react": "18.2.0",
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
} }
}, },
"node_modules/@clerk/backend": { "node_modules/@clerk/backend": {
"version": "0.19.2", "version": "0.20.0",
"resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-0.19.2.tgz", "resolved": "https://registry.npmjs.org/@clerk/backend/-/backend-0.20.0.tgz",
"integrity": "sha512-9zzhoX5IwcIrwIwZxgkyYctTUoj0phFjKuq4+IwYra9jZ8+NUEZcI/RATRbDl6WcZcnoW7qChL1OH6QXRv3u+A==", "integrity": "sha512-kVYjXAtPyWz5vv/J/42L6SYuBV6qhRnxwhDU8PUIcrw8No7yTdqCAX/BNV+yebuy/XE2h6jGbH6JorYOx7g/Qg==",
"dependencies": { "dependencies": {
"@clerk/types": "^3.38.1", "@clerk/types": "^3.39.0",
"@peculiar/webcrypto": "1.4.1", "@peculiar/webcrypto": "1.4.1",
"@types/node": "16.18.6", "@types/node": "16.18.6",
"deepmerge": "4.2.2", "deepmerge": "4.2.2",
...@@ -88,12 +88,12 @@ ...@@ -88,12 +88,12 @@
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
}, },
"node_modules/@clerk/clerk-react": { "node_modules/@clerk/clerk-react": {
"version": "4.16.2", "version": "4.16.3",
"resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-4.16.2.tgz", "resolved": "https://registry.npmjs.org/@clerk/clerk-react/-/clerk-react-4.16.3.tgz",
"integrity": "sha512-7WNmIlTKtNTzo5u7iHQqjWH/qzX22AY9iGM/zND2kCbCLKD39l5A2iecJ3aNLnWmxrz9xpgYVfTVbaVYWnEzPA==", "integrity": "sha512-ksCal0JCWCfT2UNnKHLL9t7T6TfYfSBvzTCMPIIlcwJDHoeuJIJawdC1tqHU18ALBGmRf6GUskmPxGFrCSeAtQ==",
"dependencies": { "dependencies": {
"@clerk/shared": "^0.16.2", "@clerk/shared": "^0.17.0",
"@clerk/types": "^3.38.1", "@clerk/types": "^3.39.0",
"swr": "1.3.0", "swr": "1.3.0",
"tslib": "2.4.1" "tslib": "2.4.1"
}, },
...@@ -110,12 +110,12 @@ ...@@ -110,12 +110,12 @@
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
}, },
"node_modules/@clerk/clerk-sdk-node": { "node_modules/@clerk/clerk-sdk-node": {
"version": "4.9.2", "version": "4.10.1",
"resolved": "https://registry.npmjs.org/@clerk/clerk-sdk-node/-/clerk-sdk-node-4.9.2.tgz", "resolved": "https://registry.npmjs.org/@clerk/clerk-sdk-node/-/clerk-sdk-node-4.10.1.tgz",
"integrity": "sha512-JibCbTiRZZ8hkgRMiGYVip7ogI2picZ6NaTed/d+QqvziRsE5M3wyfEUOIUSeO3hfaKUytGvofczikH6AAaCyA==", "integrity": "sha512-dPt2780Y4GxbQEGJ9NBTUUNiZUOwWErYVceggPLQZVxKjJ+SSpF99Pi3wqJp0oyXS2Xl2X3fs9IqRiqeuSq/vg==",
"dependencies": { "dependencies": {
"@clerk/backend": "^0.19.2", "@clerk/backend": "^0.20.0",
"@clerk/types": "^3.38.1", "@clerk/types": "^3.39.0",
"@types/cookies": "0.7.7", "@types/cookies": "0.7.7",
"@types/express": "4.17.14", "@types/express": "4.17.14",
"@types/node-fetch": "2.6.2", "@types/node-fetch": "2.6.2",
...@@ -146,14 +146,14 @@ ...@@ -146,14 +146,14 @@
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
}, },
"node_modules/@clerk/nextjs": { "node_modules/@clerk/nextjs": {
"version": "4.18.2", "version": "4.18.4",
"resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-4.18.2.tgz", "resolved": "https://registry.npmjs.org/@clerk/nextjs/-/nextjs-4.18.4.tgz",
"integrity": "sha512-m0cXwAPhT3yUJsNyl1leAUMu/AoX46cEx/FADU/tX/D4Vf68YuB8uCivTrPSO4luASIVi/noLFQYJIo3W96qhQ==", "integrity": "sha512-6Ir9Uqne4bLtgZYhBp+6hWlRfdPBnMnID0FVJadBBzvyOvPOzRf/eg/nV+9Ndh20APMiZNmlVpMKnFZluw/h8w==",
"dependencies": { "dependencies": {
"@clerk/backend": "^0.19.2", "@clerk/backend": "^0.20.0",
"@clerk/clerk-react": "^4.16.2", "@clerk/clerk-react": "^4.16.3",
"@clerk/clerk-sdk-node": "^4.9.2", "@clerk/clerk-sdk-node": "^4.10.1",
"@clerk/types": "^3.38.1", "@clerk/types": "^3.39.0",
"path-to-regexp": "6.2.1", "path-to-regexp": "6.2.1",
"tslib": "2.4.1" "tslib": "2.4.1"
}, },
...@@ -172,9 +172,9 @@ ...@@ -172,9 +172,9 @@
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
}, },
"node_modules/@clerk/shared": { "node_modules/@clerk/shared": {
"version": "0.16.2", "version": "0.17.0",
"resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-0.16.2.tgz", "resolved": "https://registry.npmjs.org/@clerk/shared/-/shared-0.17.0.tgz",
"integrity": "sha512-TiMw3MB1daQc0CIVolstOIkuDURo1BteHDdKIUUU8ZKTsD9p2Kdb488pYo6jMi08YZ639Yov7dhoedclcDAMHw==", "integrity": "sha512-hehSbAoshqz1VFPDD20SVoY30GqbjrKNI1Il3cFKm/0FBahph1B9X19v6LVHaEaAiuyO2h9CeGQV/sNObS27Iw==",
"dependencies": { "dependencies": {
"glob-to-regexp": "0.4.1" "glob-to-regexp": "0.4.1"
}, },
...@@ -183,9 +183,9 @@ ...@@ -183,9 +183,9 @@
} }
}, },
"node_modules/@clerk/types": { "node_modules/@clerk/types": {
"version": "3.38.1", "version": "3.39.0",
"resolved": "https://registry.npmjs.org/@clerk/types/-/types-3.38.1.tgz", "resolved": "https://registry.npmjs.org/@clerk/types/-/types-3.39.0.tgz",
"integrity": "sha512-/gBeFp3f7r23uU0ag5qxmwGKUc222YokgiPCusU8NE+AFbg1PIfudrw/0eKRbSZbz6DI7E+mxVz4M3mVkTJVlQ==", "integrity": "sha512-8kQnRIrGgaR6p3cl/iX9FPuCX/J5h2aANploQx4acKAPhJEEOOpfGO1Ba4+NIAFKHYC0zf6rwuveGTzERWeFpQ==",
"dependencies": { "dependencies": {
"csstype": "3.1.1" "csstype": "3.1.1"
}, },
...@@ -3783,9 +3783,9 @@ ...@@ -3783,9 +3783,9 @@
} }
}, },
"node_modules/lucide-react": { "node_modules/lucide-react": {
"version": "0.220.0", "version": "0.221.0",
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.220.0.tgz", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.221.0.tgz",
"integrity": "sha512-bYtGUsLAWBvZu+BzAU/ziP1gzE4LwMEXLnlgSr1yUKEPPalLG77JLd5GdYebOVkpm+GtqRqnp6tEKDX7Bm8ZlQ==", "integrity": "sha512-g99pn2/lBaCEAA0cbi4eaCO+3rY4mSfjCaDlo8Z30F0wk8MXoBXhCR1TaUS9cmNdOP9VGxgUpoB4qMg7/vyC8A==",
"peerDependencies": { "peerDependencies": {
"react": "^16.5.1 || ^17.0.0 || ^18.0.0" "react": "^16.5.1 || ^17.0.0 || ^18.0.0"
} }
......
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
"preview": "next build && next start" "preview": "next build && next start"
}, },
"dependencies": { "dependencies": {
"@clerk/nextjs": "^4.18.2", "@clerk/nextjs": "^4.18.4",
"@prisma/client": "^4.14.1", "@prisma/client": "^4.14.1",
"@radix-ui/react-dropdown-menu": "^2.0.4", "@radix-ui/react-dropdown-menu": "^2.0.4",
"@radix-ui/react-slot": "^1.0.1", "@radix-ui/react-slot": "^1.0.1",
"@tanstack/react-query": "^4.29.7", "@tanstack/react-query": "^4.29.7",
"class-variance-authority": "^0.6.0", "class-variance-authority": "^0.6.0",
"clsx": "^1.2.1", "clsx": "^1.2.1",
"lucide-react": "^0.220.0", "lucide-react": "^0.221.0",
"next": "13.4.3", "next": "13.4.3",
"next-themes": "^0.2.1", "next-themes": "^0.2.1",
"react": "18.2.0", "react": "18.2.0",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment