Skip to content

Commit c74176e

Browse files
committed
2 parents 030e943 + 09d7544 commit c74176e

80 files changed

Lines changed: 372 additions & 197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/nextjs.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2+
#
3+
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4+
#
5+
# Tutorial Followed: https://youtu.be/mJuz45RXeXY?si=NC-_5bMozCXveC5L
6+
name: Deploy Next.js site to Pages
7+
8+
on:
9+
# Runs on pushes targeting the default branch
10+
push:
11+
branches: ["master"]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
23+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
24+
concurrency:
25+
group: "pages"
26+
cancel-in-progress: false
27+
28+
jobs:
29+
# Build job
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
- name: Detect package manager
36+
id: detect-package-manager
37+
run: |
38+
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
39+
echo "manager=yarn" >> $GITHUB_OUTPUT
40+
echo "command=install" >> $GITHUB_OUTPUT
41+
echo "runner=yarn" >> $GITHUB_OUTPUT
42+
exit 0
43+
elif [ -f "${{ github.workspace }}/package.json" ]; then
44+
echo "manager=npm" >> $GITHUB_OUTPUT
45+
echo "command=ci" >> $GITHUB_OUTPUT
46+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
47+
exit 0
48+
else
49+
echo "Unable to determine package manager"
50+
exit 1
51+
fi
52+
- name: Setup Node
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: "20"
56+
cache: ${{ steps.detect-package-manager.outputs.manager }}
57+
- name: Setup Pages
58+
uses: actions/configure-pages@v5
59+
with:
60+
# Automatically inject basePath in your Next.js configuration file and disable
61+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
62+
#
63+
# You may remove this line if you want to manage the configuration yourself.
64+
static_site_generator: next
65+
- name: Restore cache
66+
uses: actions/cache@v4
67+
with:
68+
path: |
69+
.next/cache
70+
# Generate a new cache whenever packages or source files change.
71+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
72+
# If source files changed but packages didn't, rebuild from a prior cache.
73+
restore-keys: |
74+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
75+
- name: Install dependencies
76+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
77+
- name: Build with Next.js
78+
run: ${{ steps.detect-package-manager.outputs.runner }} next build
79+
- name: Upload artifact
80+
uses: actions/upload-pages-artifact@v3
81+
with:
82+
path: ./out
83+
84+
# Deployment job
85+
deploy:
86+
environment:
87+
name: github-pages
88+
url: ${{ steps.deployment.outputs.page_url }}
89+
runs-on: ubuntu-latest
90+
needs: build
91+
steps:
92+
- name: Deploy to GitHub Pages
93+
id: deployment
94+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,47 @@ yarn-debug.log*
1616
# Ignore testing coverage reports
1717
/coverage/
1818
# Ignore MacOS system files
19-
.DS_Store
19+
.DS_Stores
20+
21+
22+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
23+
24+
# dependencies
25+
/node_modules
26+
/.pnp
27+
.pnp.*
28+
.yarn/*
29+
!.yarn/patches
30+
!.yarn/plugins
31+
!.yarn/releases
32+
!.yarn/versions
33+
34+
# testing
35+
/coverage
36+
37+
# next.js
38+
/.next/
39+
/out/
40+
41+
# production
42+
/build
43+
44+
# misc
45+
.DS_Store
46+
*.pem
47+
48+
# debug
49+
npm-debug.log*
50+
yarn-debug.log*
51+
yarn-error.log*
52+
.pnpm-debug.log*
53+
54+
# env files (can opt-in for committing if needed)
55+
.env*
56+
57+
# vercel
58+
.vercel
59+
60+
# typescript
61+
*.tsbuildinfo
62+
next-env.d.ts

README.md

Lines changed: 68 additions & 9 deletions
File renamed without changes.
File renamed without changes.

okstateacm.github.io/.gitignore

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)