Skip to content

Commit

Permalink
github actions attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
emrergin committed Dec 30, 2023
1 parent fb00f82 commit 0c34407
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 14 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Prepare files
run: |
cp -r public .next/standalone
cp -r ./.next/static .next/standalone/.next
- name: Archive files
uses: actions/upload-artifact@v2
with:
name: app
path: .next/standalone

deploy:
needs: build
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Download files
uses: actions/download-artifact@v2
with:
name: app
path: /home/zulmet/servers/belief/
- name: Copy .env
run: cp /home/zulmet/servers/.env /home/zulmet/servers/belief/standalone/.env
- name: Move
run: cd /home/zulmet/servers/belief/standalone
- name: Update server.js
run: sed -i 's/3000/3002/g' server.js
- name: Restart server
run: |
pm2 restart server.js --name belief
pm2 save
2 changes: 1 addition & 1 deletion src/components/Intro2.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useCallback, useEffect } from "react";
import { useState, useCallback } from "react";

import { Button } from "@mantine/core";

Expand Down
15 changes: 2 additions & 13 deletions src/components/TopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import customStyles from "@/styles/Custom.module.css";
import { GpsQuestion } from "@/utilities/types";
import { Stepper, Divider } from "@mantine/core";
import { Stepper } from "@mantine/core";
import { Phase } from "@/utilities/types";

const phaseName = new Map();
Expand Down Expand Up @@ -70,11 +70,7 @@ function TopBar({
: `${allGpsQuestions.indexOf(currentQuestion) + 2}/8`
: ""
}
>
{/* <div>{phase === "DEMO" ?1:allGpsQuestions.indexOf(currentQuestion)+2}/8</div> */}
</Stepper.Step>
{/* <Stepper.Step label={phaseName.get(Phase.End)}>
</Stepper.Step> */}
></Stepper.Step>
<Stepper.Completed>
<div>
<div>Deney Bitti. Kazandığınız toplam puan: {points} </div>
Expand All @@ -85,13 +81,6 @@ function TopBar({
</Stepper.Completed>
</Stepper>
</div>

{/* <div>{phaseName.get(phase)}</div> */}
{/* {!(phase === "INTRO" || phase === "INTRO2") && (
<div>Toplam puan: {points}</div>
)}
{phase === "MAIN" && <div>Mevcut oyun: {currentRound}/{lastRound}</div>}
{(phase === "DEMO" || phase === "GPS") && <div>Mevcut anket: {phase === "DEMO" ?1:allGpsQuestions.indexOf(currentQuestion)+2}/8</div>} */}
</div>
);
}
Expand Down

0 comments on commit 0c34407

Please sign in to comment.