-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the MADJ101 Mobile App documentation. This project aims to develop a mobile app using GitHub and Firebase to run courses listed in the repository. The following sections provide a comprehensive guide on the setup, usage, and deployment processes.
Repository: skunkworksza/MADJ101 Owner: MADJ101 Public: Yes
. ├── .github │ ├── dependabot.yml │ └── workflows │ ├── deploy-preview.yml │ └── deploy-prod.yml ├── actions-runner ├── public │ ├── index.html │ ├── main.js │ └── style.css ├── .firebaserc ├── .gitignore ├── .prettierignore ├── .prettierrc.yaml ├── LICENSE ├── README.md ├── action.yml ├── babel.config.ts ├── firebase.json ├── firestore.indexes.json ├── firestore.rules ├── package.json └── tsconfig.json
To set up Firebase Hosting, follow these steps:
- Initialize Firebase Hosting (if not already set up):
firebase init hosting
- Set up GitHub Action for Firebase Hosting:
firebase init hosting:github
For more details, refer to the Firebase Hosting documentation.
This project uses GitHub Actions to automate deployments. Two workflows are set up:
- Deploy to Preview Channel for Every PR:
* Workflow file: .github/workflows/deploy-preview.yml * Deploys to a new preview channel for each pull request. * Adds a comment with the preview URL on the PR.
- Deploy to Live Channel on Merge:
* Workflow file: .github/workflows/deploy-prod.yml * Deploys to the live channel on every push to the '''main''' branch.
name: Deploy to Preview Channel
on:
pull_request: # Optionally configure to run only for specific files. For example: # paths: # - "website/**"
jobs:
build_and_preview: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: "${{ secrets.GITHUB_TOKEN }}" firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}" expires: 30d projectId: your-Firebase-project-ID
name: Deploy to Live Channel
on:
push: branches: - main # Optionally configure to run only for specific files. For example: # paths: # - "website/**"
jobs:
deploy_live_website: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: FirebaseExtended/action-hosting-deploy@v0 with: firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}" projectId: your-Firebase-project-ID channelId: live
- firebaseServiceAccount: Service account JSON key. Create using firebase init hosting:github or manually. Store this as an encrypted secret in your repository settings.
- repoToken: GitHub token for commenting on PRs. Set this to ${{secrets.GITHUB_TOKEN}}. GitHub sets this automatically.
- expires: Duration the preview channel remains active. Default is 7 days.
- projectId: Firebase project ID.
- channelId: ID of the channel to deploy to. Default is a new preview channel per branch or PR.
- target: Target name of the Hosting site to deploy to.
- entryPoint: Directory containing firebase.json. Default is the repository root.
- firebaseToolsVersion: Version of firebase-tools to use. Default is the latest.
- disableComment: Disable PR commenting with the preview URL.
- urls: Deployed URLs.
- expire_time: Expiry time of the deployed preview URLs.
- expire_time_formatted: Expiry time in UTC format.
- details_url: Single URL that was deployed.
Status: Experimental
This repository is maintained by Googlers but is not a supported Firebase product. Issues are answered by maintainers and community members on GitHub on a best-effort basis.
For further assistance and detailed setup guides, refer to the Firebase Hosting documentation.
---
By following the above steps, you can efficiently set up and manage the deployment of your MADJ101 mobile app using GitHub and Firebase. If you have any questions or need further clarification, feel free to reach out through the repository's issues section.