feat: gh pages deployment
This commit is contained in:
parent
1048287fce
commit
a87a6a3c4c
8 changed files with 132 additions and 17 deletions
94
.github/workflows/deploy.yml
vendored
Normal file
94
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
# Sample workflow for building and deploying a Next.js site to GitHub Pages
|
||||
#
|
||||
# To get started with Next.js see: https://nextjs.org/docs/getting-started
|
||||
#
|
||||
name: Deploy Next.js site to Pages
|
||||
|
||||
on:
|
||||
# Runs on pushes targeting the default branch
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
# Build job
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Detect package manager
|
||||
id: detect-package-manager
|
||||
run: |
|
||||
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
|
||||
echo "manager=yarn" >> $GITHUB_OUTPUT
|
||||
echo "command=install" >> $GITHUB_OUTPUT
|
||||
echo "runner=yarn" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
elif [ -f "${{ github.workspace }}/package.json" ]; then
|
||||
echo "manager=npm" >> $GITHUB_OUTPUT
|
||||
echo "command=ci" >> $GITHUB_OUTPUT
|
||||
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
else
|
||||
echo "Unable to determine package manager"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
.next/cache
|
||||
# Generate a new cache whenever packages or source files change.
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||
# 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:
|
||||
path: ./out
|
||||
|
||||
# Deployment job
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
|
@ -1,4 +1,10 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
const nextConfig = {
|
||||
output: 'export',
|
||||
basePath: '/eexiv-2',
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
}
|
||||
|
||||
export default nextConfig;
|
||||
export default nextConfig
|
||||
|
|
0
public/.nojekyll
Normal file
0
public/.nojekyll
Normal file
|
@ -4,6 +4,11 @@ import { Zilla_Slab } from 'next/font/google'
|
|||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
export function generateStaticParams() {
|
||||
const affiliationsList = Object.keys(affiliations)
|
||||
return affiliationsList.map((shortName) => ({ shortName }))
|
||||
}
|
||||
|
||||
export default function Page({
|
||||
params,
|
||||
}: Readonly<{ params: { shortName: string } }>) {
|
||||
|
|
|
@ -6,6 +6,11 @@ import { Fragment } from 'react'
|
|||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
export function generateStaticParams() {
|
||||
const authorsList = Object.keys(authors)
|
||||
return authorsList.map((author) => ({ author }))
|
||||
}
|
||||
|
||||
export default function Page({
|
||||
params,
|
||||
}: Readonly<{
|
||||
|
|
|
@ -237,7 +237,7 @@ authorName (as a slug): {
|
|||
affiliation: an array of affiliation "slugs". this should correspond to affiliations in the affiliations data.
|
||||
The first affiliation will be considered the primary affiliation
|
||||
|
||||
image: image url, can store in public/img/profiles or link to a web resource
|
||||
image: image url, can store in public/eexiv-2/img/profiles or link to a web resource
|
||||
|
||||
nationality: an array of ISO 3 letter country codes corresponding to your nationalities or ethniciities
|
||||
|
||||
|
@ -272,7 +272,7 @@ export const authors: Authors = {
|
|||
},
|
||||
affiliation: ['Undergraduate@usc-viterbi'],
|
||||
formerAffiliations: ['Lead Mechanical Engineer@1280-mech', 'Student@srvhs'],
|
||||
image: '/img/profiles/shasan.jpg',
|
||||
image: '/eexiv-2/img/profiles/shasan.jpg',
|
||||
nationality: ['pak', 'usa'],
|
||||
},
|
||||
mbohsali: {
|
||||
|
@ -281,7 +281,7 @@ export const authors: Authors = {
|
|||
last: 'Bohsali',
|
||||
},
|
||||
affiliation: ['Lead Programming Engineer@1280-eecs', 'Student@srvhs'],
|
||||
image: '/img/profiles/default.png',
|
||||
image: '/eexiv-2/img/profiles/default.png',
|
||||
nationality: ['lbn', 'usa'],
|
||||
},
|
||||
avenkatesh: {
|
||||
|
@ -291,7 +291,7 @@ export const authors: Authors = {
|
|||
},
|
||||
affiliation: ['Lead Controls Engineer@1280-eecs'],
|
||||
formerAffiliations: ['Programming Lead@1280-programming'],
|
||||
image: '/img/profiles/avenkatesh.png',
|
||||
image: '/eexiv-2/img/profiles/avenkatesh.png',
|
||||
nationality: ['ind', 'eth', 'usa'],
|
||||
bio: 'The king of jank.',
|
||||
website: 'https://github.com/quantum9Innovation',
|
||||
|
@ -302,7 +302,7 @@ export const authors: Authors = {
|
|||
last: 'Wu',
|
||||
},
|
||||
affiliation: ['Artificial Intelligence Lead@1280-eecs'],
|
||||
image: '/img/profiles/ywu.webp',
|
||||
image: '/eexiv-2/img/profiles/ywu.webp',
|
||||
nationality: ['chn'],
|
||||
bio: 'The kingpin of jank. Never before has so much jank been so distilled in one place.',
|
||||
website: 'https://github.com/couscousdude',
|
||||
|
@ -318,7 +318,7 @@ export const authors: Authors = {
|
|||
'General Affairs@1280-business',
|
||||
'Student@srvhs',
|
||||
],
|
||||
image: '/img/profiles/wlin.jpg',
|
||||
image: '/eexiv-2/img/profiles/wlin.jpg',
|
||||
nationality: ['twn', 'chn', 'usa'],
|
||||
formerAffiliations: ['Intern@raid-zero'],
|
||||
bio: 'Hi, I am Kaito or Warren. I am a Self-taught programmer and engineer. I go around doing dumb things such as my projects. I have a dream of building a community. I am currently part of many projects.',
|
||||
|
@ -330,7 +330,7 @@ export const authors: Authors = {
|
|||
last: 'Ostler',
|
||||
},
|
||||
affiliation: ['Vision Researcher@1280-eecs', 'Student@srvhs'],
|
||||
image: '/img/profiles/gostler.jpg',
|
||||
image: '/eexiv-2/img/profiles/gostler.jpg',
|
||||
nationality: ['usa'],
|
||||
website: 'https://github.com/gavinostler',
|
||||
bio: `I'm Gavin, a high school student from the Bay Area. I am a fullstack developer and love making random things to fill my day. I'm interested in creating useful tools and software in the future.`,
|
||||
|
@ -350,7 +350,7 @@ export const affiliations: Affiliations = {
|
|||
'1280-mech': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Mechanical Subteam",
|
||||
short: '1280 Mech',
|
||||
image: '/img/logos/1280-main.png',
|
||||
image: '/eexiv-2/img/logos/1280-main.png',
|
||||
description: `The mechanical subteam is the backbone of Team 1280, focusing on the physical design, construction, and mechanical integrity of their robots. This subteam is where concepts and designs become tangible, transforming ideas into the moving parts and structural components that give the robots their form and function. The Mechanical subteam's work encompasses a broad range of activities, from drafting initial sketches and CAD modeling to machining parts and assembling complex mechanical systems.
|
||||
[linebreak]
|
||||
Members of the Mechanical subteam are adept in applying principles of mechanical engineering to solve practical problems, ensuring that the robot is not only capable of performing the tasks required by the competition but is also robust, efficient, and adaptable to the dynamic environment of a FIRST Robotics match. They work closely with materials, tools, and manufacturing processes, gaining hands-on experience in fabrication techniques such as welding, 3D printing, and CNC machining.
|
||||
|
@ -362,7 +362,7 @@ The Mechanical subteam fosters a culture of creativity, innovation, and excellen
|
|||
'1280-eecs': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Electrical Engineering and Computer Science Subteam",
|
||||
short: '1280 EECS',
|
||||
image: '/img/logos/eecs-wordmark.png',
|
||||
image: '/eexiv-2/img/logos/eecs-wordmark.png',
|
||||
description: `The Team 1280 EECS (Electrical Engineering and Computer Science) subteam is an autonomous organization within Team 1280, specializing in the design, programming, and electrical systems that bring their robots to life. As the nerve center of Team 1280, the EECS subteam combines the disciplines of electrical engineering and computer science to develop sophisticated control systems, autonomous functionalities, and robust electrical infrastructures that enable their robots to perform complex tasks and maneuvers in the competitive arena.
|
||||
[linebreak]
|
||||
Team 1280 EECS is composed of highly skilled and passionate students who are keen on applying theoretical knowledge to practical challenges. They are responsible for everything from circuit design and sensor integration to software development and debugging, ensuring that the robot can effectively communicate, navigate, and interact with its environment.
|
||||
|
@ -372,13 +372,13 @@ Team 1280 EECS benefits from mentorship by experienced professionals and alumni,
|
|||
'1280-programming': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Programming Subteam (now defunct)",
|
||||
short: '1280 Programming',
|
||||
image: '/img/logos/1280-main.png',
|
||||
image: '/eexiv-2/img/logos/1280-main.png',
|
||||
description: `The former programming subteam of Team 1280, it combined with the Team 1280 electrical subteam in a historic merger to form Team 1280 EECS.`,
|
||||
},
|
||||
'usc-viterbi': {
|
||||
name: 'University of Southern California, Viterbi School of Engineering',
|
||||
short: 'USC Viterbi',
|
||||
image: '/img/logos/usc-viterbi.jpg',
|
||||
image: '/eexiv-2/img/logos/usc-viterbi.jpg',
|
||||
description: `The University of Southern California (USC) Viterbi School of
|
||||
Engineering is a cornerstone of innovation and excellence in the
|
||||
engineering field. Established in 1905, it has grown into a leading
|
||||
|
@ -406,7 +406,7 @@ Team 1280 EECS benefits from mentorship by experienced professionals and alumni,
|
|||
'1280-business': {
|
||||
name: "Team 1280, the Ragin' C Biscuits, Business Subteam",
|
||||
short: '1280 Business',
|
||||
image: '/img/logos/1280-main.png',
|
||||
image: '/eexiv-2/img/logos/1280-main.png',
|
||||
description: `The Business subteam of Team 1280 plays a crucial role in ensuring the team's operational success and sustainability. Unlike the engineering-focused subteams, the Business subteam focuses on the financial, organizational, and community aspects of the team's operations. They are responsible for fundraising, sponsorship outreach, budget management, and public relations, ensuring that the team has the necessary resources and support to thrive in their endeavors.
|
||||
[linebreak]
|
||||
Members of the Business subteam develop and execute strategies to engage with corporate sponsors, local businesses, and individual donors, crafting compelling sponsorship proposals and maintaining ongoing relationships with stakeholders. They also manage the team's finances, meticulously planning and tracking expenditures to ensure that resources are allocated efficiently and effectively.
|
||||
|
@ -420,7 +420,7 @@ By bridging the gap between engineering innovation and business acumen, the Busi
|
|||
'raid-zero': {
|
||||
name: 'Team 4253 - Raid Zero',
|
||||
short: 'Raid 0',
|
||||
image: '/img/logos/raid-zero.png',
|
||||
image: '/eexiv-2/img/logos/raid-zero.png',
|
||||
description: `Team 4253, Raid Zero, hailing from Taipei American School in Taipei, Taipei Special Municipality, Chinese Taipei, has been a formidable presence in the world of robotics since its rookie year in 2012. As a participant in the international FIRST Robotics Competition, Raid Zero exemplifies innovation, teamwork, and the pursuit of excellence in science, technology, engineering, and mathematics (STEM).
|
||||
[linebreak]
|
||||
Since its inception, Raid Zero has dedicated itself to designing, building, and programming competitive robots that can perform complex tasks and compete at high levels. The team's journey through the FIRST Robotics Competition has been marked by continuous learning, adaptation, and growth, reflecting their commitment to not only compete but also to embody the ideals of gracious professionalism and cooperation.
|
||||
|
@ -434,7 +434,7 @@ Raid Zero's influence extends beyond the technical achievements in robotics comp
|
|||
srvhs: {
|
||||
name: 'San Ramon Valley High School',
|
||||
short: 'SRVHS',
|
||||
image: '/img/logos/srvhs.jpg',
|
||||
image: '/eexiv-2/img/logos/srvhs.jpg',
|
||||
description: `A relatively average high school located in Danville, California. It has no standout features besides being the base of operations for Team 1280 and Team 1280 EECS.`,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -12,6 +12,11 @@ import { epoch2datestring } from '@/app/utils/epoch2datestring'
|
|||
|
||||
const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
|
||||
|
||||
export function generateStaticParams () {
|
||||
const documentsList = Object.keys(documents)
|
||||
return documentsList.map((slug) => ({ slug }))
|
||||
}
|
||||
|
||||
export default function Page({
|
||||
params,
|
||||
}: Readonly<{ params: { slug: string } }>) {
|
||||
|
|
|
@ -33,7 +33,7 @@ export default function RootLayout({
|
|||
<Link href='/affiliation/1280-eecs'>
|
||||
<img
|
||||
className='h-[100px] mt-4'
|
||||
src='/img/logos/eecs-wordmark.png'
|
||||
src='/eexiv-2/img/logos/eecs-wordmark.png'
|
||||
/>
|
||||
</Link>
|
||||
<p className={`max-w-[600px] hidden md:inline`}>
|
||||
|
|
Loading…
Reference in a new issue