DEV Community

Anika Tibrewala
Anika Tibrewala

Posted on • Updated on

GitHub Actions: Angular & Firebase

My Workflow

Recently I've been working with Angular applications and deploying them to firebase. I wanted to set up GitHub actions so that whenever any code is pushed into the repository, it'll automatically deploy the updated application.

Submission Category:

DIY Deployments

Yaml File or Link to Code

name: CI

on:
  push:
    branches:
    - master

jobs:
  firebase-deploy:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@master
    - uses: actions/setup-node@master
      with:
        node-version: '14.x'
    - run: npm install
    - run: npm run build:prod
    - uses: w9jds/firebase-action@master
      with:
        args: deploy --only hosting
      env:
        FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
Enter fullscreen mode Exit fullscreen mode

GitHub Repository link

Additional Resources / Info

You can check the action usage on this sample project:
GitHub Repository

Top comments (0)