Skip to content

Commit

Permalink
Merge pull request #1 from oshx/fix/resolve-warnings
Browse files Browse the repository at this point in the history
즐겨찾기 유형 추가

절대 경로로 변경

배포용 경고 문구에 대응하여 import 이름 지정으로 가져오도록 수정

GitHub Action 실행 시 deploy 및 pull-request 분리
  • Loading branch information
oshx authored Jun 26, 2024
2 parents 89f5d2c + b3fa883 commit 1654375
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: GitHub Actions for Pages Deployment
run-name: ${{ github.actor }} is running out GitHub Actions 🚀
on:
pull_request:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Check out
uses: actions/checkout@v4
- run: echo "🎉 Event [${{ github.event_name }}] | 🔎 Repository [${{ github.repository }}] | 🐧 OS [${{ runner.os }}] | ⭐ Branch[${{ github.ref }}]"

- name: Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './public/'
6 changes: 3 additions & 3 deletions src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import routes from "./router/routes.config";
import Router from "svelte-spa-router";
import Credit from "./components/Credit.svelte";
import * as routes from "./router/routes.config";
import * as Router from "svelte-spa-router";
import * as Credit from "./components/Credit.svelte";
</script>

<Router {routes} />
Expand Down
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App from "./App.svelte";
import * as App from "~/src/App.svelte";

const app = new App({
target: window.document.body,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ExperimentSheet.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { beforeUpdate, createEventDispatcher } from "svelte";
import { QuestionList, ScoreLabelMap } from "../core/constants";
import { QuestionList, ScoreLabelMap } from "~/src/core/constants";
export let answerList = [];
export let readonly = false;
Expand Down
2 changes: 1 addition & 1 deletion src/components/InformationSheet.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { QuestionList, ResultList } from "../core/constants";
import { QuestionList, ResultList } from "~/src/core/constants";
export let intro = false;
export let block = !!intro;
Expand Down
2 changes: 1 addition & 1 deletion src/core/ecr.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SEPARATOR,
STEP_BASE,
STEP_CHUNK,
} from "./constants";
} from "~/src/core/constants";

const convertAnswerToChunk = (answerList, unit) =>
Array(Math.ceil(answerList.length / unit))
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/>
<meta name="format-detection" content="telephone=no,address=no,email=no" />
<meta http-equiv="x-rim-auto-match" content="none" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

<!-- Open Graph https://ogp.me/ -->
<meta property="og:title" content="성인애착유형 검사" />
Expand Down
16 changes: 8 additions & 8 deletions src/pages/Experiment.page.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script>
import { QuestionList, SERVICE_NAME } from "../core/constants";
import { convertAnswerToParam } from "../core/ecr";
import { href, push } from "../router/helper";
import { PATH_RESULT } from "../router/routes.config";
import ExperimentSheet from "../components/ExperimentSheet.svelte";
import ProgressManager from "../components/ProgressManager.svelte";
import Message from "../components/Message.svelte";
import InformationSheet from "../components/InformationSheet.svelte";
import { QuestionList, SERVICE_NAME } from "~/src/core/constants";
import { convertAnswerToParam } from "~/src/core/ecr";
import { href, push } from "~/src/router/helper";
import { PATH_RESULT } from "~/src/router/routes.config";
import * as ExperimentSheet from "~/src/components/ExperimentSheet.svelte";
import * as ProgressManager from "~/src/components/ProgressManager.svelte";
import * as Message from "~/src/components/Message.svelte";
import * as InformationSheet from "~/src/components/InformationSheet.svelte";
let message = null;
let answerList = Array(QuestionList.length).fill(0);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/NotFound.page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script>
import { href, link } from "../router/helper";
import { PATH_EXPERIMENT } from "../router/routes.config";
import { href, link } from "~/src/router/helper";
import { PATH_EXPERIMENT } from "~/src/router/routes.config";
const startPath = href(PATH_EXPERIMENT);
</script>
Expand Down
13 changes: 6 additions & 7 deletions src/pages/Result.page.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<script>
import { beforeUpdate } from "svelte";
import { convertParamToScore, convertScoreToResult } from "../core/ecr";
import { SERVICE_NAME } from "../core/constants";
import ExperimentSheet from "../components/ExperimentSheet.svelte";
import { PATH_EXPERIMENT } from "../router/routes.config";
import { href, link } from "../router/helper";
import InformationSheet from "../components/InformationSheet.svelte";
import Credit from "../components/Credit.svelte";
import { convertParamToScore, convertScoreToResult } from "~/src/core/ecr";
import { SERVICE_NAME } from "~/src/core/constants";
import * as ExperimentSheet from "~/src/components/ExperimentSheet.svelte";
import { PATH_EXPERIMENT } from "~/src/router/routes.config";
import { href, link } from "~/src/router/helper";
import * as InformationSheet from "~/src/components/InformationSheet.svelte";
export let params;
Expand Down
2 changes: 1 addition & 1 deletion src/router/helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { parse, compile } from "path-to-regexp";
export * from "svelte-spa-router";
import queryStringTool from "query-string";
import { default as queryStringTool } from "query-string";
export { queryStringTool };

export const href = (path, params = {}, options = {}) => {
Expand Down
6 changes: 3 additions & 3 deletions src/router/routes.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PageExperiment from "../pages/Experiment.page.svelte";
import PageResult from "../pages/Result.page.svelte";
import PageNotFound from "../pages/NotFound.page.svelte";
import * as PageExperiment from "~/src/pages/Experiment.page.svelte";
import * as PageResult from "~/src/pages/Result.page.svelte";
import * as PageNotFound from "~/src/pages/NotFound.page.svelte";

export const PATH_EXPERIMENT = "/";
export const PATH_RESULT = "/results/:result";
Expand Down

0 comments on commit 1654375

Please sign in to comment.