Skip to content

Commit

Permalink
push to github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
charliepiper committed Mar 18, 2024
1 parent 450e6bd commit fe8044d
Show file tree
Hide file tree
Showing 55 changed files with 143 additions and 276 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/deploy.yml → .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Deploy Next.js site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
branches: ["website"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -31,7 +31,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Detect package manager
id: detect-package-manager
run: |
Expand All @@ -49,16 +48,19 @@ jobs:
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Setup Pages
uses: actions/configure-pages@v4

with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
Expand All @@ -69,13 +71,10 @@ jobs:
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}

- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand All @@ -91,4 +90,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
33 changes: 0 additions & 33 deletions .github/workflows/node.js.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# next.js
/.next/

/out/

# production
/build
Expand All @@ -33,4 +33,4 @@ yarn-error.log*

# typescript
*.tsbuildinfo
next-env.d.ts
next-env.d.ts
61 changes: 5 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,10 @@
# Website
run the development server:

The **[website](https://charliepiper.github.io)** (for ENG1 cohort1/group1)


## Project Structure
The project structure is organised as follows:

```
ENG1/
├── src/app/ # Contains Next.js pages
│ ├── page.tsx # Home page
│ ├── layout.tsx # Home page layout
├── src/components/ # Reusable components
│ ├── ContentSection.tsx # Links to documents component
│ ├── DownloadSection.tsx # Game download component
│ ├── Footer.js # Footer component
│ ├── HeroSection.tsx # Hero component
│ ├── Navbar.tsx # Navbar component (both phone and desktop)
├── public/ # Static assets
│ └── ... # Other assets
├── styles/ # Global styles
│ └── globals.css # Global CSS file
├── README.md # Project documentation
├── package.json # Node.js dependencies and scripts
└── ...
```bash
npm install
npm run dev
```

## Technologies / Frameworks

-- **[Next.js](https://nextjs.org)**

-- **[TailwindCSS](https://tailwindcss.com)**


## Setup

To set up the project locally, follow these steps:

1. Clone the repository:
```bash
git clone <repository-url> (for now (will change) https://github.com/charliepiper/charliepiper.github.io.git)
```

2. Install dependencies:
```bash
npm install
```

3. Start the development server:
```bash
npm run dev
```

4. Open [http://localhost:3000](http://localhost:3000) in your browser to view the website.
open [http://localhost:3000](http://localhost:3000) with your browser


13 changes: 4 additions & 9 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
favicon: "/icon.ico",
output: "export",
images: {
unoptimized: true
},
trailingSlash: true,
}

module.exports = nextConfig
output: 'export',
}

module.exports = nextConfig
Empty file removed out/. nojekyll
Empty file.
Loading

0 comments on commit fe8044d

Please sign in to comment.