Official site of the Chinese Student Association of Georgia Tech.
Static Gatsby site powered by Contentful, forked from the official Contentful Starter Blog.
This site can be hosted in 2 different locations (see deployment below for more information):
- GitHub Pages (for development)
- Georgia Tech Hosting (for production)
See the official Contentful getting started guide.
$ git clone [email protected]:GT-CSA/GT-CSA.github.io.git
$ yarn
Rename .contentful.json.sample
to .contentful.json
and add your configuration in this file.
Run the project locally with live reload in development mode.
Run a production build into ./public
. The result is ready to be put on any static hosting you prefer.
Spin up a production-ready server with your blog. Don't forget to build your page beforehand.
Deployment is done through the GitHub Pages action. This action updates the gh-pages
branch with a new commit and deploys the result to GitHub pages. This branch can be deleted in case development is on pause and not necessary.
Georgia Tech Plesk Hosting is the production platform used for the site, as it is the platform provided by Georgia Tech. In order to set up continuous deployment for this platform, a GT Enterprise repository is needed. This is due to the strictness of GT's auth system, which only allows for GT services to communicate with other GT services. The workaround we use is to push the gh-pages
branch on update to a dummy GT Enterprise repo using a GT Enterprise PAT and username (e.g. mchen434), which then triggers the webhook that updates the live site.
The deployment workflow is also tied to a Contentful update webhook action, meaning whenever anything in the Gerogia Tech CSA Contentful space is updated, the site will redeploy and reflect those changes. For actions run by the webhook, it will always take more than 5 minutes. This is done in order to wait for Contentful's API to properly reflect any changes.
The Contenful hook requires the use of another GitHub PAT. In case the hook does not trigger or fails any actions, please check if the PAT has expired, and regenerate it in case it has. Please note that this PAT is not the same as the GT Enterprise PAT, but a personal PAT with rights to this repository. This PAT is used in the Authorization
header of the webhook request, and has the format Bearer [PAT]
(no brackets).
This repository was created by Matt Chen, Acting President of CSA 2021-22.
Feel free to make pull requests to this codebase.