Skip to content

Commit 9db0d2f

Browse files
committed
Add GitHub Pages deployment workflow
1 parent 59170e6 commit 9db0d2f

4 files changed

Lines changed: 73 additions & 22 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
workflow_run:
5+
workflows: ["tests"]
6+
branches: [main]
7+
types: [completed]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
27+
- uses: pnpm/action-setup@v4
28+
with:
29+
version: 9
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
cache: "pnpm"
34+
- run: pnpm install --frozen-lockfile
35+
- run: pnpm build
36+
- uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: dist
39+
40+
deploy:
41+
needs: build
42+
runs-on: ubuntu-latest
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
steps:
47+
- uses: actions/deploy-pages@v4
48+
id: deployment

README.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
# AZQUERYSUCKS
22

3-
## Getting Started
3+
Course scheduling helper app for Tamkang University course data.
44

5-
First, run the development server:
5+
## Development
66

77
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
8+
pnpm install
129
pnpm dev
13-
# or
14-
bun dev
1510
```
1611

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
12+
Open `http://localhost:3000`.
1813

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
14+
## Environment
2015

21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
16+
- `VITE_COURSES_URL` (preferred)
2217

23-
## Learn More
18+
If neither is set, the app uses the public GitHub JSON fallback in `src/components/course-scheduler-content.tsx`.
2419

25-
To learn more about Next.js, take a look at the following resources:
20+
## Scripts
2621

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
22+
- `pnpm dev` - Run TanStack Start in development mode
23+
- `pnpm build` - Build production assets
24+
- `pnpm start` - Preview the production build
25+
- `pnpm test` - Run unit tests
26+
- `pnpm lint` - Run Biome checks
27+
- `pnpm test:e2e` - Run Playwright end-to-end tests
2928

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
29+
## Static Assets
3130

32-
## Deploy on Vercel
31+
- `public/manifest.webmanifest`
32+
- `public/robots.txt`
33+
- `public/og.svg`
34+
- `public/favicon.ico`
3335

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
36+
## Deployment (GitHub Pages)
3537

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
38+
Deployment is handled directly by GitHub Actions on pushes to `main`, publishing
39+
`dist` to GitHub Pages at `https://cantpr09ram.github.io/AZQUERYSUCKS/`.

public/manifest.webmanifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"name": "AZQUERYSUCKS",
33
"short_name": "AZQ",
44
"description": "AZQUERYSUCKS",
5-
"start_url": "/",
5+
"start_url": "./",
66
"display": "standalone",
77
"background_color": "#ffffff",
88
"theme_color": "#ffffff",
99
"icons": [
1010
{
11-
"src": "/favicon.ico",
11+
"src": "./favicon.ico",
1212
"sizes": "any",
1313
"type": "image/x-icon"
1414
}

public/og.png

12.6 KB
Loading

0 commit comments

Comments
 (0)