feat(time-preferences): add time grid for users to select study time … #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Firebase Preview Deploy | |
# Trigger the workflow on PRs to the main branch only | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deploy-preview: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
issues: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
- name: Install dependencies | |
run: npm install | |
- name: Build the app | |
run: npm run build | |
- name: Install Firebase CLI | |
run: npm install -g firebase-tools | |
- name: Deploy to Firebase Preview Channel | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
run: firebase hosting:channel:deploy pr-${{ github.event.number }} --expires 3d | |
# Step to post the preview link to the PR discussion | |
- name: Post preview link to PR | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const previewUrl = `https://pr-${{ github.event.number }}--studybuddy-8086e.web.app`; | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `🚀 Preview for this PR is available at: ${previewUrl}` | |
}); |