Skip to content

Commit

Permalink
fix: for publishing with asset access
Browse files Browse the repository at this point in the history
  • Loading branch information
ramsunvtech committed Jan 6, 2025
1 parent 9fe7608 commit cf90fc6
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy

on:
push:
branches: [ main ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: out
4 changes: 2 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
// basePath: '/test-mate',
// assetPrefix: '/test-mate',
// basePath: '/test-mate',
// assetPrefix: '',
};

export default nextConfig;
2 changes: 2 additions & 0 deletions src/app/components/QuestionComponent.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import FillInTheBlanks from './questionTypes/FillInTheBlanks';
import MultipleChoice from './questionTypes/MultipleChoice';
import MatchTheFollowing from './questionTypes/MatchTheFollowing';
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/Quiz.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useState, useEffect } from 'react';
import QuestionComponent from './QuestionComponent';
import ResultsPage from './ResultsPage';
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/QuizSelection.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

export default function QuizSelection({ selectQuizType }) {
return (
<div>
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/ResultsPage.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useState } from 'react'

export default function ResultsPage({ questions, userAnswers, score, totalQuestions, resetQuiz }) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/questionTypes/FillInTheBlanks.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useState, useEffect } from 'react'

export default function FillInTheBlanks({ question, onAnswer, userAnswer }) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/questionTypes/MatchTheFollowing.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useState, useEffect } from 'react';

const MatchTheFollowing = ({ question, onAnswer, userAnswer }) => {
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/questionTypes/MultipleChoice.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

export default function MultipleChoice({ question, onAnswer, userAnswer }) {
const handleChange = (option) => {
if (question.multipleAnswers) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/questionTypes/TrueFalse.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

export default function TrueFalse({ question, onAnswer, userAnswer }) {
return (
<div>
Expand Down
2 changes: 2 additions & 0 deletions src/app/components/questionTypes/WriteSentence.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

import { useState } from 'react'

export default function WriteSentence({ question, onAnswer, userAnswer }) {
Expand Down
1 change: 1 addition & 0 deletions src/app/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const geistMono = Geist_Mono({
export const metadata = {
title: "Test Mate",
description: "Prepare exam by attending test dumps",
metadataBase: new URL('https://web-slate.github.io/test-mate'),
};

export default function RootLayout({ children }) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/utils/arrayUtils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use client"

export function shuffleArray(array) {
if (!Array.isArray(array)) {
console.error('Input is not an array:', array)
Expand Down

0 comments on commit cf90fc6

Please sign in to comment.