Skip to content

Commit 0dc8d5c

Browse files
authored
Merge pull request #155 from DevDogs-UGA/staging
Staging
2 parents cf3c028 + cf40920 commit 0dc8d5c

245 files changed

Lines changed: 14994 additions & 19944 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.

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# ignore everything
2+
**/**
3+
4+
# specific exceptions
5+
!.env
6+
!docker-compose.yaml

.editorconfig

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

.env.example

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Since the ".env" file is gitignored, you can use the ".env.example" file to
2+
# build a new ".env" file when you clone the repo. Keep this file up-to-date
3+
# when you add new variables to `.env`.
4+
5+
# This file will be committed to version control, so make sure not to have any
6+
# secrets in it. If you are cloning this repo, create a copy of this file named
7+
# ".env" and populate it with your secrets.
8+
9+
# When adding additional environment variables, the schema in "/src/env.js"
10+
# should be updated accordingly.
11+
12+
# Base for OAuth Redirect URLs
13+
BASE_URL="http://localhost:3000"
14+
15+
# Start of DevDogs
16+
DEVDOGS_EPOCH="2024-07-22"
17+
18+
# Discord
19+
DISCORD_CLIENT_ID=""
20+
DISCORD_CLIENT_SECRET=""
21+
DISCORD_GUILD_ID="1231994798165069987"
22+
DISCORD_PUBLIC_KEY=""
23+
DISCORD_TOKEN=""
24+
25+
# GitHub
26+
GITHUB_CLIENT_ID=""
27+
GITHUB_CLIENT_SECRET=""
28+
GITHUB_ORG="DevDogs-UGA"
29+
GITHUB_TOKEN="ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
30+
31+
# Google
32+
GOOGLE_CLIENT_ID="000000000000-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.apps.googleusercontent.com"
33+
GOOGLE_CLIENT_SECRET="aaaaaa-aa-aaaaaaaaaaaaaaaaaaaaaaaaa"
34+
35+
# MySQL
36+
MYSQL_USER="root"
37+
MYSQL_PASSWORD="password"
38+
MYSQL_HOST="localhost"
39+
MYSQL_PORT="25060"
40+
MYSQL_DATABASE="devdogs"
41+
42+
# S3
43+
S3_PORT="4566"
44+
S3_REGION="us-east-1"
45+
S3_ACCESS_KEY_ID="test"
46+
S3_SECRET_ACCESS_KEY="test"
47+
48+
# For Production
49+
SHARED_AUTH_CLIENT_ID=""
50+
SHARED_AUTH_CLIENT_SECRET=""

.firebaserc

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

.git-blame-ignore-revs

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

.github/workflows/ci.yaml

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,44 @@
1-
name: Continuous Integration
2-
3-
on: [push, pull_request]
4-
5-
concurrency:
6-
group: ${{ github.workflow }}-${{ github.ref }}
7-
cancel-in-progress: true
8-
9-
permissions:
10-
contents: read
1+
name: CI
2+
env:
3+
VERCEL_ORG_ID: ${{ secrets.VERCEL_TEAM_ID }}
4+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
5+
TURBO_TOKEN: ${{ secrets.VERCEL_TOKEN }}
6+
TURBO_TEAM: ${{ secrets.VERCEL_TEAM_ID }}
7+
REF: ${{ (github.event_name == 'pull_request' && github.base_ref) || github.ref_name }}
8+
on:
9+
- pull_request_target
10+
- push
1111

1212
jobs:
13-
style:
14-
name: Code Style
13+
Checkstyle-Lint-Build:
1514
runs-on: ubuntu-latest
15+
if: ${{ github.repository == 'DevDogs-UGA/Community-Resource-Forum' }}
1616
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v4
19-
20-
- name: Set up Node.js
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version-file: "package.json"
24-
17+
- uses: actions/checkout@v2
18+
- uses: ariga/setup-atlas@master
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
2521
- name: Install dependencies
26-
run: npm ci
27-
28-
- name: Check style (ESLint)
29-
run: npx eslint src/
30-
31-
- name: Check style (Prettier)
32-
run: npx prettier --check src/
22+
run: pnpm install --ignore-scripts
23+
- name: Validate Formatting and Linting
24+
run: SKIP_ENV_VALIDATION=true pnpm turbo lint prettier typecheck
25+
- name: Dry Run Project Deployment (for PRs)
26+
if: ${{ github.event_name == 'pull_request' }}
27+
run: |
28+
SKIP_ENV_VALIDATION=true pnpm turbo build
29+
pnpm dlx vercel env pull ${{ env.ENV_CONFIG }} --token=${{ secrets.VERCEL_TOKEN }} .env
30+
pnpm dlx dotenv-cli -- sh -c 'atlas schema apply --config file://migrations/atlas.hcl --env remote --dev-url docker://mysql/8/example --url mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST:$MYSQL_PORT/$MYSQL_DATABASE --dry-run'
31+
env:
32+
ENV_CONFIG: ${{ (env.REF == 'main' && '--environment=production') || format('--environment=preview --git-branch={0}', env.REF) }}
33+
- name: Deploy Project (for Pushes)
34+
if: ${{ github.event_name == 'push' }}
35+
run: |
36+
pnpm dlx vercel pull ${{ env.ENV_CONFIG }} --yes --git-branch=${{ github.base_ref }} --token=${{ secrets.VERCEL_TOKEN }}
37+
pnpm dlx vercel env pull ${{ env.ENV_CONFIG }} --token=${{ secrets.VERCEL_TOKEN }} .env
38+
pnpm db:generate
39+
pnpm dlx vercel build ${{ env.BUILD_CONFIG }} --token=${{ secrets.VERCEL_TOKEN }}
40+
pnpm dlx vercel deploy ${{ env.BUILD_CONFIG }} --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
41+
pnpm dlx dotenv-cli -- sh -c 'atlas schema apply --config file://migrations/atlas.hcl --env remote --dev-url docker://mysql/8/example --url mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST:$MYSQL_PORT/$MYSQL_DATABASE --auto-approve'
42+
env:
43+
ENV_CONFIG: ${{ (env.REF == 'main' && '--environment=production') || format('--environment=preview --git-branch={0}', env.REF) }}
44+
BUILD_CONFIG: ${{ (env.REF == 'main' && '--prod') || ' ' }}

.github/workflows/nextjs.yml

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

.github/workflows/pnpm-build.yml

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

0 commit comments

Comments
 (0)