Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PURPLE_BEACH_03C38C91E }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: "upload"
app_location: "./Client" # Path to the client app source code
api_location: "" # Path to API source code, if any
output_location: "/dist" # Built app content directory
app_location: "./packages/client"
api_location: ""
output_location: "/dist"
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }}
Expand All @@ -51,3 +51,4 @@ jobs:
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_PURPLE_BEACH_03C38C91E }}
action: "close"
app_location: "./packages/client"
27 changes: 12 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: Install Client Dependencies
run: |
cd Client
cd packages/client
npm install
env:
VITE_SENTRY_AUTH_TOKEN: ${{ secrets.VITE_SENTRY_AUTH_TOKEN }}
Expand All @@ -30,10 +30,10 @@ jobs:
VITE_SERVER_URL: ${{ secrets.VITE_SERVER_URL }}

- name: Run lint
run: cd Client && npm run lint
run: cd packages/client && npm run lint

- name: Build Client
run: cd Client && npm run build
run: cd packages/client && npm run build
env:
VITE_SENTRY_AUTH_TOKEN: ${{ secrets.VITE_SENTRY_AUTH_TOKEN }}
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
Expand All @@ -44,11 +44,10 @@ jobs:
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
VITE_SERVER_URL: ${{ secrets.VITE_SERVER_URL }}
# Add this step to cache the build
- name: Cache build artifacts
uses: actions/cache@v3
with:
path: Client/dist
path: packages/client/dist
key: ${{ runner.os }}-client-build-${{ github.sha }}

shared-build:
Expand All @@ -62,15 +61,15 @@ jobs:
node-version: "20.x"

- name: Install Shared Dependencies
run: cd shared && npm install
run: cd packages/shared && npm install

- name: Build Shared Package
run: cd shared && npm run build
run: cd packages/shared && npm run build

- name: Cache Shared Build
uses: actions/cache@v3
with:
path: shared/dist
path: packages/shared/dist
key: ${{ runner.os }}-shared-build-${{ github.sha }}

server-setup:
Expand All @@ -85,24 +84,22 @@ jobs:
with:
node-version: "20.x"

# Restore client build cache
- name: Restore build artifacts
uses: actions/cache@v3
with:
path: Client/dist
path: packages/client/dist
key: ${{ runner.os }}-client-build-${{ github.sha }}

# Restore shared build cache
- name: Restore shared build
uses: actions/cache@v3
with:
path: shared/dist
path: packages/shared/dist
key: ${{ runner.os }}-shared-build-${{ github.sha }}

- name: Install Dependencies and Link Shared
run: |
# Install shared package
cd shared
cd packages/shared
npm install
npm run build
npm link
Expand All @@ -113,10 +110,10 @@ jobs:
npm link @polylink/shared

- name: Run lint
run: cd server && npm run lint
run: cd packages/server && npm run lint

- name: Build Server
run: cd server && npm run build
run: cd packages/server && npm run build

# Placeholder for future server-side testing
# - name: Run Server Tests
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/main_polylink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:

# Step 4: Build Shared + Server
- name: Build Shared
run: npm run build:shared
run: npm run build --workspace=packages/shared

- name: Build Server
run: npm run build:server
run: npm run build --workspace=packages/server

# Step 5: Prune down to production dependencies *inside the server folder*
# so we only ship what's needed for runtime.
- name: Prune for Production (Server)
run: |
cd server
cd packages/server
# Remove any old node_modules
rm -rf node_modules
# Install ONLY production dependencies, pinned by the root lock file
Expand All @@ -50,21 +50,21 @@ jobs:
# Step 6: Create final deployment artifact with dist + node_modules + package.json
- name: Create zip artifact
run: |
cd server
cd packages/server
zip -r release.zip dist node_modules package.json

# Step 7: Show ZIP contents (for debugging)
- name: Show ZIP contents
run: |
cd server
cd packages/server
zipinfo release.zip

# Step 8: Upload Artifact
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: server-app
path: server/release.zip
path: packages/server/release.zip

deploy:
runs-on: ubuntu-latest
Expand Down
37 changes: 10 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,18 @@
"version": "1.0.0",
"private": true,
"workspaces": [
"Client",
"server",
"shared"
"packages/*"
],
"description": "Polylink is an AI-powered web application that helps students find classes, clubs, events, professors, and more. We are a team of students with the misison to make the college experience easier and more enjoyable.",
"main": "index.js",
"scripts": {
"install:client": "cd Client && npm install",
"install:server": "cd server && npm install",
"install:shared": "cd shared && npm install",
"install:all": "npm run install:client && npm run install:server && npm run install:shared",
"build:client": "cd Client && npm run build",
"build:server": "cd server && npm run build",
"build:shared": "cd shared && npm run build",
"build:all": "npm run build:client && npm run build:server && npm run build:shared",
"start:client": "cd Client && npm run dev",
"start:server": "cd server && npm start",
"start:shared": "cd shared && npm run dev",
"start": "npm run start:server",
"dev:server": "cd server && npm run dev",
"dev:shared": "cd shared && npm run dev",
"dev": "concurrently \"npm run start:client\" \"npm run dev:server\" \"npm run dev:shared\"",
"postinstall": "",
"format:client": "cd Client && npm run format",
"format:server": "cd server && npm run format",
"format:shared": "cd shared && npm run format",
"format": "npm run format:client && npm run format:server && npm run format:shared",
"lint:client": "cd Client && npm run lint",
"lint:server": "cd server && npm run lint",
"lint": "npm run lint:client && npm run lint:server"
"install": "npm install -ws",
"build": "npm run build --workspaces --if-present",
"start": "npm run start --workspace=packages/server",
"dev": "concurrently \"npm run dev --workspace=packages/client\" \"npm run dev --workspace=packages/server\" \"npm run dev --workspace=packages/shared\"",
"format": "npm run format --workspaces --if-present",
"lint": "npm run lint --workspaces --if-present",
"clean": "rimraf **/dist **/node_modules"
},
"keywords": [],
"author": "Cristian Castro Oliva",
Expand Down Expand Up @@ -66,6 +48,7 @@
"devDependencies": {
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5",
"rollup-plugin-visualizer": "^5.14.0"
"rollup-plugin-visualizer": "^5.14.0",
"rimraf": "^5.0.5"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading