Deployment - acm-csula/ACM-Main-Website GitHub Wiki

How to deploy the website with Firebase?

Using the command line while in your project directory (prefer: master branch):

  1. npm run build
  2. It is good practice to update the CLI: npm install -g firebase-tools
  3. firebase login
  4. firebase projects:list
  5. No need to do firebase init. The purpose of firebase init is to create firebase.json and .firebaserc, which we already have.
  6. Strongly recommend: firebase serve to test locally on Firebase before deploying. Refresh or change pages if you don't see your new changes.
  7. firebase deploy -m "Type your comment"
  8. firebase logout
  • Note: In firebase.json, it must have "public":"build". Otherwise, the deployed website will show a blank page.
  • Always do npm run build before deploying again.