Skip to content

feat: firebase hosting deploy by github actions #2

feat: firebase hosting deploy by github actions

feat: firebase hosting deploy by github actions #2

name: Deploy to Firebase Hosting on PR
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/preview-pull-request.yaml'
- '**'
jobs:
deploy_web:
name: Web Firebase Hosting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: 20
- name: build
run: |
npm ci
npx ng add angular-cli-ghpages --skip-confirmation
npx ng build --base-href=/2024/
- name: lint
run: npm run lint
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
entryPoint: "./"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: "${{ secrets.PROJECT_ID }}"
channelId: ${{ github.head_ref }}