Add auto deployment (#130)
continuous-integration/drone/push Build is passing Details

Co-authored-by: shahanneda <shahan.neda@gmail.com>
Reviewed-on: #130
This commit is contained in:
Shahan Nedadahandeh 2023-01-01 16:00:14 -05:00
parent 7ef5d8aa61
commit 7c4efad55c
2 changed files with 8 additions and 7 deletions

View File

@ -50,7 +50,7 @@ steps:
registry: registry.cloud.csclub.uwaterloo.ca registry: registry.cloud.csclub.uwaterloo.ca
repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging
- name: deploy (staging) - name: deploy-staging
image: node:16 image: node:16
depends_on: depends_on:
- publish - publish
@ -61,7 +61,7 @@ steps:
- echo "The docker build tag is ${DRONE_BRANCH//\//-}" - echo "The docker build tag is ${DRONE_BRANCH//\//-}"
- 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' - 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}'
- name: deploy (production) - name: deploy-production
image: node:16 image: node:16
depends_on: depends_on:
- export - export
@ -71,10 +71,10 @@ steps:
commands: commands:
- 'echo "$SSH_KEY" > /tmp/ssh_key' - 'echo "$SSH_KEY" > /tmp/ssh_key'
- chmod 600 /tmp/ssh_key - chmod 600 /tmp/ssh_key
- ssh -4 -i /tmp/ssh_key www@caffeine.csclub.uwaterloo.ca -o StrictHostKeyChecking=no '~/bin/classprofile/deploy-classprofile-2022.sh' - ssh -4 -i /tmp/ssh_key www@caffeine.csclub.uwaterloo.ca -o StrictHostKeyChecking=no '~/bin/classprofile/deploy-2022.sh'
when: # when:
branch: # branch:
- main # - main
trigger: trigger:
event: event:

View File

@ -1,5 +1,6 @@
import { pageRoutes } from "data/routes"; import { pageRoutes } from "data/routes";
import React from "react"; import React from "react";
import { basePath } from "utils/getBasePath";
import { About } from "@/components/About"; import { About } from "@/components/About";
import { CenterWrapper } from "@/components/CenterWrapper"; import { CenterWrapper } from "@/components/CenterWrapper";
@ -18,7 +19,7 @@ export default function Home() {
<div className={styles.title}> <div className={styles.title}>
<div className={styles.titleImage}> <div className={styles.titleImage}>
<img <img
src="/images/frontPageTitle.png" src={basePath + "/images/frontPageTitle.png"}
alt="A picture of the University of Waterloo campus" alt="A picture of the University of Waterloo campus"
/> />
</div> </div>