generated from acm-ucr/acm-ucr-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 31f4346
Showing
24 changed files
with
5,653 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Deploy Next.js site to Pages | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
- uses: actions/configure-pages@v4 | ||
with: | ||
static_site_generator: next | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.next/cache | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | ||
- uses: acm-ucr/build@v2 | ||
- run: touch ./.nojekyll | ||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./out | ||
env: | ||
NEXT_PUBLIC_GOOGLE_CALENDAR_API_KEY: ${{secrets.NEXT_PUBLIC_GOOGLE_CALENDAR_API_KEY}} | ||
NEXT_PUBLIC_GOOGLE_CALENDAR_EMAIL: ${{secrets.NEXT_PUBLIC_GOOGLE_CALENDAR_EMAIL}} | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: ACM UCR Website | ||
on: | ||
pull_request: | ||
branches: [main, dev] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
format: | ||
name: formatting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: acm-ucr/formatting@v2 | ||
|
||
lint: | ||
name: linting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: acm-ucr/linting@v2 | ||
|
||
images: | ||
name: images | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: acm-ucr/images@v2 | ||
with: | ||
branch: ${{ github.head_ref }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: acm-ucr/build@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npm run check && npm run eslint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"recommendations": [ | ||
"bradlc.vscode-tailwindcss", | ||
"esbenp.prettier-vscode", | ||
"eamodio.gitlens", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# ACM UCR Website Template | ||
|
||
![Next.js](https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white) | ||
![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white) | ||
![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white) | ||
![Figma](https://img.shields.io/badge/figma-%23F24E1E.svg?style=for-the-badge&logo=figma&logoColor=white) | ||
<br/> | ||
![ESLint](https://img.shields.io/badge/ESLint-4B3263?style=for-the-badge&logo=eslint&logoColor=white) | ||
![Prettier](https://img.shields.io/badge/prettier-1A2C34?style=for-the-badge&logo=prettier&logoColor=F7BA3E) | ||
![GitHub Actions](https://img.shields.io/badge/GitHub_Actions-2088FF?style=for-the-badge&logo=github-actions&logoColor=white) | ||
|
||
## Figma | ||
|
||
[ACM UCR Website Template Figma Design File](https://www.figma.com/) | ||
|
||
## Node.js | ||
|
||
ACM UCR Website Template runs on Node.js Version 20.10.0 and higher. Please ensure you have Node.js installed via the [official website](https://nodejs.org/en). | ||
|
||
## Next.js | ||
|
||
This project is built using [Next.js](https://nextjs.org), a React framework. Next.js is automatically installed when you install all dependencies for this project. | ||
|
||
## Environment Variables | ||
|
||
The following environment variables are required and must be stored in an `.env` file: | ||
|
||
```env | ||
N/A | ||
``` | ||
|
||
## Commands | ||
|
||
### Dependencies | ||
|
||
```bash | ||
# Install dependencies | ||
npm i | ||
|
||
# Add dependency | ||
npm i <dependency> | ||
|
||
# Remove dependency | ||
npm un <dependency> | ||
``` | ||
|
||
### Running the Website Locally | ||
|
||
```bash | ||
# Open a browser at localhost:3000 | ||
npm run dev | ||
``` | ||
|
||
### Formatting Code via Prettier | ||
|
||
```bash | ||
# Rewrite code recursively with proper formatting | ||
npm run format | ||
|
||
# Show formatting differences recursively | ||
npm run check | ||
``` | ||
|
||
### Linting Code via Eslint | ||
|
||
```bash | ||
npm run eslint | ||
``` | ||
|
||
### Build the Website | ||
|
||
```bash | ||
npm run build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import globals from "globals"; | ||
import eslint from "@eslint/js"; | ||
import tseslint from "typescript-eslint"; | ||
import react from "eslint-plugin-react"; | ||
import prettier from "eslint-plugin-prettier/recommended"; | ||
import query from "@tanstack/eslint-plugin-query"; | ||
|
||
export default [ | ||
{ | ||
ignores: ["dist/*"], | ||
}, | ||
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] }, | ||
{ | ||
ignores: [".next/", "out/", "node_modules"], | ||
}, | ||
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } }, | ||
{ languageOptions: { globals: { ...globals.node } } }, | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
plugins: { | ||
react: react, | ||
prettier: prettier, | ||
"@typescript-eslint": tseslint.plugin, | ||
"@tanstack/query": query, | ||
}, | ||
}, | ||
{ | ||
rules: { | ||
"react/react-in-jsx-scope": "off", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"paths": { | ||
"@/*": ["./src/*"], | ||
"@/public/*": ["./public/*"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
output: "export", | ||
reactStrictMode: true, | ||
swcMinify: true, | ||
images: { | ||
loader: "akamai", | ||
path: "", | ||
unoptimized: true, | ||
}, | ||
basePath: "", | ||
assetPrefix: "", | ||
}; | ||
|
||
module.exports = nextConfig; |
Oops, something went wrong.