senior-knights / course-schedulizer

📝 Create semester schedules without stress
https://senior-knights.github.io/course-schedulizer/
MIT License
10 stars 4 forks source link

Document deployment process somewhere #263

Closed rpruim closed 1 year ago

rpruim commented 1 year ago

I'm confused about the deployment process. Yesterday's PR updated the production branch, and things work fine for me on that branch locally. But our deployed site still reflects the old interface.

Snooping, I'm seeing this:

image

Are we really using the gh-pages branch? Should that be changed to production?

Once upon a time there was a netlify site deploying this. Does that still exist? Is senior-knights.github.io/ the preferred site to share?

Is any of this documented anywhere?

rpruim commented 1 year ago

Switching to the production branch doesn't seem to fix things:

image

In fact, this seems to be worse:

image

I'm reverting to github-pages.

rpruim commented 1 year ago

OK. Found this in the readme:

npm run build Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes. Your app is ready to be deployed!

npm run deploy Used by GitHub actions to deploy the build. Will trigger predeploy command.

Looks like I need to run those. Still not entirely sure how this triggers updates in gh-pages, what is automated, and what needs manual intervantion. (Digging a little, I can see that the gh-pages branch still has the old versions of the code that was updated in production.)

rpruim commented 1 year ago

OK. That did the trick. We are in buisiness. The production branch has been deployed:

$ npm run deploy

> client-course-schedulizer@0.1.0 predeploy
> npm run build

> client-course-schedulizer@0.1.0 build
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

./src/utilities/helpers/writeFullCSV.ts
  Line 3:10:    'Day' is defined but never used                               @typescript-eslint/no-unused-vars
  Line 49:11:   'meetingStartInternalStr' is assigned a value but never used  @typescript-eslint/no-unused-vars
  Line 51:11:   'meetingEndInternalStr' is assigned a value but never used    @typescript-eslint/no-unused-vars
  Line 56:11:   'roomCapacityStr' is assigned a value but never used          @typescript-eslint/no-unused-vars
  Line 114:13:  'sectionNameStr' is assigned a value but never used           @typescript-eslint/no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  695.97 KB  build/static/js/2.aec2fa61.chunk.js
  30.26 KB   build/static/js/main.6c280e02.chunk.js
  5.42 KB    build/static/css/2.425337e9.chunk.css
  1.44 KB    build/static/css/main.dfcbb2bf.chunk.css
  786 B      build/static/js/runtime-main.b080aff4.js

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  bit.ly/CRA-deploy

> client-course-schedulizer@0.1.0 deploy
> gh-pages -d build

Published