Contributers
Kylie Lallak (@Kylie-Lallak): 'Home', 'About Us', 'Join Us' Pages Designer and Lead Developer
Priyal Patel (@priyalpatell): Project Manager and Developer
- clone repo locally
- enter "npm install" in terminal once in root directory
- then enter "npm run dev" in terminal
Instructions by Priyal Patel for Neurotech@Davis
Setting Up Firebase Console Account
- created firebase console account with our club gmail
- created a new project & gave it a name
- under build, clicked on 'hosting' and then clicked 'get started'
- clicked next for all steps
Deploying to Firebase
Followed this guide with some modifications
All commands ran in terminal at root directory
- ran
$ npm install -g firebase-tools
- checked firebase was installed
$ firebase --version
- logged into our firebase console account
$ firebase login:ci
- followed authentication process to obtain token & added it to our github action secrets
- initiated firebase project
$ firebase init
- selected option for “hosting: configure files for firebase hosting and (optionally) set up Github Action deploys”
- selected the same project created in Setting up Firebase Account
- for our public directory, typed "build"
- for configuring as a single-page app, typed "Y"
- for setting up automatic builds and deploys with Github, typed "N"
Setting Up Github Actions (Guide Modifications Here)
- ignored 'build' folder - don't need it just a formality for the steps above
- ran
$ npm run build
- changed firebase.json line 3 ("public":"build") to "public":"<name of folder created in step 2>" (in our case the folder was called 'dist')
- created a new directory called .gitub
$ mkdir .github
- inside .gitub created a directory called workflows
$ cd .github; mkdir workflows
- inside workflows created a github actions file called main
$ cd workflows; touch main.yml
- copied the main.yml file in step 5 in the guide to the new main.yml file created
- modified part of the 'Archive Production Artifact' and 'Download Artifact' sections in main.yml
- replaced 'build' to with folder name from step 2 ('dist') (changes were 'with: name: dist path: dist')
- replaced version of action to 'v3' (changes were 'uses: actions/upload-artifact@v3' and 'uses: actions/download-artifact@v3')
- Checked last line of main.yml file secret name matched the secret created in Deploying to Firebase step 4
- uploaded changes to github
$ git add .; git commit -m "changes"; git push
- our push manually triggered github actions to run starting a build & deploying website to firebase (yay)
Viewing the Website
- logged into firebase console & selected same project
- clicked on 'hosting' and then scrolled to 'domains' section
- clicked on one of the urls & website appeared (refreshed the website a couple times)
Using a Custom Domain (ex. something.com)
Followed these two guide1 and guide2
- created a Porkbun account
- bought our custom domain
- in porkbun, hovered over domain name to select DNS (porkbun dns section)
- logged into firebase console & selected the same project
- clicked on hosting, scrolled to 'domains' section, and clicked on 'add custom domain'
- typed our domain, pressed continue, and added records required onto porkbun dns section
- deleted records with 'pixie.porkbun.com' or 'pixie-parking.porkbun.com' (only had records firebase wanted listed on porkbun dns section)
- waited overnight for records to get approved
- once approved said 'connected' next to custom domain in firebase console (hosting > domains)
- went to custom domain and website could be seen :)