Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
404b193
Initial commit
carmen-chau Jun 9, 2024
920ed1e
Deployment setup
li-ruihao Jun 17, 2024
5a2e4c2
changed checks.yml's SECRET_KEY to target at secrets.CI_SECRET_KEY
li-ruihao Jun 17, 2024
9b08f62
changed file properties
li-ruihao Jun 17, 2024
7635705
try to fix yarn issue
li-ruihao Jun 17, 2024
07ad794
exclude yarn flags
li-ruihao Jun 18, 2024
3cb5318
upgrade node-version in deploy yml script
li-ruihao Jun 18, 2024
47b3912
use 2022 newhacks deploy.yml as template
li-ruihao Jun 18, 2024
8b9b6f7
use 2023 newHacks checks.yml template
li-ruihao Jun 18, 2024
1b100d5
made changes to test build script
li-ruihao Jun 20, 2024
5b3a7c2
change node version to 16 in checks.yml
li-ruihao Jun 20, 2024
b5d63bd
upgrade node version from 12 to 16 in develop
li-ruihao Jun 20, 2024
e0ec4e7
Merge branch 'develop' into test_build_branch
li-ruihao Jun 20, 2024
25eb095
Merge pull request #1 from ieeeuoft/test_build_branch
li-ruihao Jun 20, 2024
a78f418
changed django secret key to CI secret key in deploy.yml
li-ruihao Jun 20, 2024
42fb65e
Merge branch 'develop' of https://github.com/ieeeuoft/newhacks-site-2…
li-ruihao Jun 20, 2024
1cf467d
test deploy again
li-ruihao Jun 20, 2024
2bacff2
minor changes
li-ruihao Jun 22, 2024
2391797
modified init file in hackthon_site init
li-ruihao Jun 22, 2024
0351438
Revert "modified init file in hackthon_site init"
li-ruihao Jun 22, 2024
ca8835c
made changes to init file in settings init file in hackathon_site
li-ruihao Jun 22, 2024
9788564
excluded qrcode module in settings
li-ruihao Jun 22, 2024
fae4511
[TEST]: Modifying Newhacks 2024 landing page (#2)
carmen-chau Jun 26, 2024
de12520
changed registration and application dates (#3)
carmen-chau Jun 28, 2024
b7771f6
Setting up registration fields (#4)
carmen-chau Jun 30, 2024
35f1d3f
Additional Registration Form Changes (#5)
carmen-chau Aug 4, 2024
a685da1
yml changes (#6)
carmen-chau Aug 4, 2024
fd97aac
Locking Applications (#9)
carmen-chau Aug 29, 2024
4fcc06c
made change to landing page to prevent application access (#10)
carmen-chau Aug 30, 2024
7a6ff89
adding new migrations (#12)
carmen-chau Sep 7, 2024
bc52375
Fixing FAQ (#13)
carmen-chau Sep 11, 2024
76c0399
Application form - All tentative changes (#14)
carmen-chau Sep 26, 2024
df0d44e
Updated themes message for Newhacks (#15)
li-ruihao Sep 27, 2024
6a5683b
modified page wording (#17)
carmen-chau Sep 27, 2024
96d224e
change application open date (#16)
carmen-chau Sep 27, 2024
042dc29
adding the age 17 to dropdown (#18)
carmen-chau Sep 29, 2024
6043cd7
remove hardware related faq stuff (#19)
carmen-chau Oct 6, 2024
906df32
Adding review info for admins (#20)
carmen-chau Oct 9, 2024
4abd604
change (#21)
carmen-chau Oct 11, 2024
d2d1df3
initial changes
carmen-chau Oct 17, 2024
3f925d6
revise date
carmen-chau Oct 17, 2024
f39353f
Merge pull request #22 from ieeeuoft/add-acceptance-email-template
Mustaballer Oct 17, 2024
a37b180
Rsvp support (#23)
Mustaballer Oct 20, 2024
89d7ba6
revise waitlist email html template (#25)
carmen-chau Oct 22, 2024
12e2bd1
Copy QR code scanner changes
Mustaballer Oct 24, 2024
0f6f3fd
run black
Mustaballer Oct 24, 2024
a747263
add dark background for admin view and admin scanning
Mustaballer Oct 24, 2024
5cc8638
revert __init__.py
Mustaballer Oct 24, 2024
1b0a120
add correct qr scanning events
Mustaballer Oct 24, 2024
a05581a
adjust registration timing
Mustaballer Oct 24, 2024
d4789a9
add visibility for specific dietary requirement and modified event 2 …
Mustaballer Oct 25, 2024
ffb0a36
Merge pull request #26 from ieeeuoft/qr-code-scanner
Mustaballer Oct 25, 2024
6f9a09c
Update deploy.yml
Mustaballer Oct 25, 2024
1205802
show UserActivity in admin site
Mustaballer Oct 25, 2024
0067e44
Merge branch 'develop' into qr-code-scanner
Mustaballer Oct 25, 2024
977fc1a
Merge pull request #27 from ieeeuoft/qr-code-scanner
Mustaballer Oct 25, 2024
d533aee
change (#28)
carmen-chau Oct 26, 2024
3e10170
Merge 1
guaaaaa Mar 31, 2025
15aa555
Init commit
guaaaaa Mar 31, 2025
5d1b81a
Delete .github/workflows/main.yml
guaaaaa Apr 1, 2025
37ccb60
Update docker-compose.yml
guaaaaa Apr 1, 2025
5594fcc
Update docker-compose.prod.yml
guaaaaa Apr 1, 2025
17db3f0
Update deploy.yml
guaaaaa Apr 1, 2025
6f27dc6
Update yarn.lock
guaaaaa Apr 1, 2025
25f781d
Update deploy.yml
guaaaaa Apr 1, 2025
3ea0de3
Update constants.js
guaaaaa Apr 10, 2025
c350c36
Update api.ts
guaaaaa Apr 10, 2025
50f3906
Update __init__.py
guaaaaa Apr 11, 2025
5dfcc91
Update __init__.py
guaaaaa Apr 16, 2025
68b1342
Update deploy.yml
guaaaaa Apr 16, 2025
cdc6644
Update README.md
guaaaaa May 19, 2025
8a5b181
Update README.md
guaaaaa May 22, 2025
f6ed3b6
Fix dates for MLH applications
guaaaaa Jun 8, 2025
6c0c01c
Added interest form button on the home page
guaaaaa Jun 9, 2025
9fe0dd4
Change button name
guaaaaa Jun 9, 2025
0aa2596
Merge pull request #1 from ieeeuoft/add-interest-form
guaaaaa Jun 9, 2025
aa2bb19
Update __init__.py
guaaaaa Jun 11, 2025
6476f97
Update __init__.py
guaaaaa Jun 11, 2025
f90291a
Update deploy.yml
guaaaaa Jun 11, 2025
c86fdd5
Update deploy.yml
guaaaaa Jun 12, 2025
a7a65c8
Update __init__.py
guaaaaa Jun 14, 2025
7de4afb
Update __init__.py
guaaaaa Jun 14, 2025
c3b343b
Update MLH badge and link to 2026
guaaaaa Jun 16, 2025
a0f7e95
Merge pull request #2 from ieeeuoft/add-interest-form
guaaaaa Jun 16, 2025
62f4056
Added new environment setup guild
guaaaaa Aug 14, 2025
1875790
Modify documentation
guaaaaa Aug 14, 2025
2be8763
Merge pull request #3 from ieeeuoft/env-fix
guaaaaa Sep 17, 2025
45fb572
Update Dockerfile
guaaaaa Sep 17, 2025
20cf6d0
Rename Onboard.md to onboard.md
guaaaaa Sep 17, 2025
1d85a02
Change application questions, apply migrations, update mlh links, upd…
guaaaaa Sep 24, 2025
2b757f6
Merge pull request #4 from ieeeuoft/newhack2025-update
guaaaaa Sep 24, 2025
a735531
Update __init__.py
guaaaaa Sep 24, 2025
5b0c8b3
Update registration date, modify question order
guaaaaa Sep 25, 2025
95d4e63
Change themes
guaaaaa Oct 2, 2025
8f22581
Application date changes
guaaaaa Oct 8, 2025
80620fc
Phone number country code fix
guaaaaa Oct 9, 2025
7165e63
Update participant packages and discord
guaaaaa Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/main.yml → .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI/CD
name: Checks

on:
pull_request_target:
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
black --check .
- name: Tests
env:
SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
SECRET_KEY: ${{ secrets.CI_SECRET_KEY }}
DEBUG: 0
run: python manage.py test --settings=hackathon_site.settings.ci

Expand All @@ -52,8 +52,6 @@ jobs:
node-version: '16.x'
- name: Install dependencies
run: yarn install
- name: Formatting check
run: yarn run prettier-check

dashboard-checks:
runs-on: ubuntu-latest
Expand All @@ -77,6 +75,4 @@ jobs:
- name: Typescript check
run: yarn run tsc
- name: Tests
run: yarn test --watchAll=false
- name: Build frontend
run: yarn run build
run: yarn test --watchAll=false
144 changes: 144 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Deploy

on:
push:
branches:
- 'develop'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
STACK_NAME: newhacks-site

jobs:
build:
runs-on: ubuntu-latest
outputs:
GITHUB_SHA_SHORT: ${{ steps.sha7.outputs.GITHUB_SHA_SHORT }}

steps:
- uses: actions/checkout@v2
- name: Get short SHA
id: sha7
run: |
GITHUB_SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-7)
echo "GITHUB_SHA_SHORT=${GITHUB_SHA_SHORT}" >> $GITHUB_ENV
echo "::set-output name=GITHUB_SHA_SHORT::${GITHUB_SHA_SHORT}"
- name: Build image
run: docker compose -f deployment/docker-compose.ci.yml build
- name: Docker login
uses: docker/login-action@v1.10.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push image
run: docker compose -f deployment/docker-compose.ci.yml push

deploy:
runs-on: ubuntu-latest
needs: [ build ]
environment:
name: production
url: https://newhacks.ca
defaults:
run:
working-directory: deployment
env:
GITHUB_SHA_SHORT: ${{ needs.build.outputs.GITHUB_SHA_SHORT }}

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9.23
uses: actions/setup-python@v1
with:
python-version: 3.9.23
- name: Install python dependencies
working-directory: hackathon_site
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install nodejs dependencies
working-directory: hackathon_site/event
run: yarn install
- name: Compile scss
working-directory: hackathon_site/event
run: yarn scss
- name: Collect static
working-directory: hackathon_site
env:
SECRET_KEY: ${{ secrets.CI_SECRET_KEY }}
run: python manage.py collectstatic
- name: Build frontend
working-directory: hackathon_site/dashboard/frontend
run: |
yarn install
yarn run build
- name: Set environment variables in .env
run: |
echo 'DEBUG=0' >> .env
echo 'SECRET_KEY=${{ secrets.CI_SECRET_KEY }}' >> .env
echo 'DB_NAME=${{ secrets.DB_NAME }}' >> .env
echo 'DB_USER=${{ secrets.DB_USER }}' >> .env
echo 'DB_PASSWORD=${{ secrets.DB_PASSWORD }}' >> .env
echo 'DB_HOST=${{ secrets.DB_HOST }}' >> .env
echo 'DB_PORT=${{ secrets.DB_PORT }}' >> .env
echo 'EMAIL_HOST=${{ secrets.EMAIL_HOST }}' >> .env
echo 'EMAIL_PORT=${{ secrets.EMAIL_PORT }}' >> .env
echo 'EMAIL_HOST_USER=${{ secrets.EMAIL_HOST_USER }}' >> .env
echo 'EMAIL_HOST_PASSWORD=${{ secrets.EMAIL_HOST_PASSWORD }}' >> .env
echo 'EMAIL_FROM_ADDRESS=${{ secrets.EMAIL_FROM_ADDRESS }}' >> .env
echo 'REDIS_URI=${{ secrets.REDIS_URI }}' >> .env
echo 'RECAPTCHA_PUBLIC_KEY=${{ secrets.RECAPTCHA_PUBLIC_KEY }}' >> .env
echo 'RECAPTCHA_PRIVATE_KEY=${{ secrets.RECAPTCHA_PRIVATE_KEY }}' >> .env
- name: Transfer static files to the Swarm manager
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SWARM_MANAGER_IP }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
overwrite: true
# scp-action doesn't obey working-directory, runs at repo root
source: "hackathon_site/static/"
target: "/usr/src/${{ env.IMAGE_NAME }}"
strip_components: 1
- name: Set up SSH
run: |
mkdir -p ~/.ssh
ssh-keyscan -t ed25519 ${{ secrets.SWARM_MANAGER_IP }} >> ~/.ssh/known_hosts
echo "${{ secrets.SSH_PRIVATE_KEY }}" >> ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
- name: Transfer frontend files to server
uses: appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.SWARM_MANAGER_IP }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
overwrite: true
# scp-action doesn't obey working-directory, runs at repo root
source: "hackathon_site/dashboard/frontend/build/"
target: "/usr/src/${{ env.IMAGE_NAME }}"
strip_components: 3
- name: Bring up deployment
env:
DOCKER_HOST: ssh://${{ secrets.SSH_USER }}@${{ secrets.SWARM_MANAGER_IP }}
run: |
echo "Logging in to GitHub packages..."
echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
echo "Bringing up deployment..."
docker stack deploy --prune --with-registry-auth -c docker-compose.prod.yml ${{ env.STACK_NAME }}
echo "Waiting for deployment..."
sleep 30
chmod 777 docker-stack-wait.sh
./docker-stack-wait.sh -t 600 ${{ env.STACK_NAME }}
echo "Running migrations..."
# TODO: It would be better to use docker-compose against the django service,
# but there is currently a bug in docker-compose preventing running services
# over an SSH host.
IMAGE=${REGISTRY}/${IMAGE_NAME}/django:${GITHUB_SHA_SHORT}
docker run --rm --env-file .env ${IMAGE} python manage.py migrate
echo "Deployment complete"
Loading
Loading