From b8e43bcf645049cc4c300a410edd5580d7385c68 Mon Sep 17 00:00:00 2001 From: j285he Date: Sat, 18 Jun 2022 23:08:14 -0400 Subject: [PATCH 1/2] Change sans-serif fallback to monospace (#20) Since inconsolata is a monospace font, I think we should change the fallback to be monospace as well (it also matches the aesthetic of the design more closely). What do you all think? Co-authored-by: Jared He <66887902+jaredjhe@users.noreply.github.com> Reviewed-on: https://git.csclub.uwaterloo.ca/www/cs-2022-class-profile/pulls/20 Reviewed-by: Amy --- pages/_app.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/_app.css b/pages/_app.css index 4a17bd4..92ef010 100644 --- a/pages/_app.css +++ b/pages/_app.css @@ -64,7 +64,7 @@ body { background-color: var(--primary-background); color: var(--primary-text); - font-family: "Inconsolata", "sans-serif"; + font-family: "Inconsolata", "monospace"; margin: 0; } From 67aa21fd65796a70353f7803ed8ba93bc0adf540 Mon Sep 17 00:00:00 2001 From: Shahan Neda Date: Sun, 26 Jun 2022 16:14:27 -0400 Subject: [PATCH 2/2] Add CI (#13) --- .drone.yml | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 2 ++ docs/CI.md | 8 +++++++ 3 files changed, 79 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 docs/CI.md diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..9a2840d --- /dev/null +++ b/.drone.yml @@ -0,0 +1,69 @@ +--- +kind: pipeline +type: docker +name: node16 + +steps: +- name: view-staging-url + image: node:16 + commands: + - echo "staging url will be https://${DRONE_BRANCH//\//-}-csc-class-profile-staging-snedadah.k8s.csclub.cloud" + +- name: install-deps + image: node:16 + commands: + - npm install + +- name: lint + image: node:16 + depends_on: + - install-deps + commands: + - npm run lint + +- name: build + image: node:16 + depends_on: + - install-deps + commands: + - npm run build + +- name: export + image: node:16 + depends_on: + - build + commands: + - npm run export + +- name: publish + image: plugins/docker:latest + depends_on: + - export + settings: + username: + from_secret: HARBOUR_USERNAME + password: + from_secret: HARBOUR_PASSWORD + tags: + - ${DRONE_BRANCH//\//-} + - latest + registry: registry.cloud.csclub.uwaterloo.ca + repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging + +- name: deploy + image: node:16 + depends_on: + - publish + environment: + STAGING_AUTH_TOKEN: + from_secret: STAGING_AUTH_TOKEN + commands: + - echo "The docker build tag is ${DRONE_BRANCH//\//-}" + - 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}' + +trigger: + event: + exclude: + - pull_request #avoid double build on PRs + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dfb0893 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM nginx +COPY ./out /usr/share/nginx/html diff --git a/docs/CI.md b/docs/CI.md new file mode 100644 index 0000000..bdc8238 --- /dev/null +++ b/docs/CI.md @@ -0,0 +1,8 @@ +## Setting up CI + +- Follow instructions on [CSC cloud](https://docs.cloud.csclub.uwaterloo.ca/kubernetes/) to setup csccloud. +- Setup the repository to store your docker images on [CSC Harbour](https://docs.cloud.csclub.uwaterloo.ca/registry/). +- Make sure to add harbour auth tokens to drone. Click the my profile page on harbour, and set HARBOUR_USERNAME and HARBOUR_PASSWORD on drone secrets to the username and cli secret from the harbour profile page. +- Clone the [server repo](https://git.csclub.uwaterloo.ca/snedadah/csc-webhooks), fill in desired links, update env file with the auth token, update STAGING_AUTH_TOKEN in drone to match. Run `npm start` to start server in the background. +- Possibly put a crontab to restart the script on [startup](https://stackoverflow.com/questions/12973777/how-to-run-a-shell-script-at-startup) +