Git Product home page Git Product logo

deploy-firebase's Introduction

Deploy to Firebase

A GitHub Action to deploy to Firebase Hosting.

  • Make sure that you checkout the repository using the actions/checkout action
  • Make sure that you have the firebase.json file in the repository
  • To obtain the Firebase token, run firebase login:ci on your local computer and store the token as the FIREBASE_TOKEN secret
  • Specify the Firebase project name in the FIREBASE_PROJECT env var

Workflow examples

Deploy the main branch when a commit is pushed to it:

name: Deploy the main branch
on:
  push:
    branches:
      - main
jobs:
  main:
    name: Deploy to Firebase
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: lowply/[email protected]
      env:
        FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
        FIREBASE_PROJECT: name-of-the-project

Deploy only when a tag starts with v is pushed:

name: Deploy a tag
on:
  push:
    tags:
      - v*
jobs:
  main:
    name: Deploy to Firebase
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: lowply/[email protected]
      env:
        FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
        FIREBASE_PROJECT: name-of-the-project

deploy-firebase's People

Contributors

lowply avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

deploy-firebase's Issues

Does this project have build steps?

I'd like to run npm run build in the dir before deploying - I'm not sure I follow the repo with being able to run custom commands (including only deploying certain targets, like hosting.)

Is this a capability in this package?

Make this action generic

Instead of deploying the hosting only, would be nice to deploy all like functions, firestore, etc. You just need to remove the --only hosting.

Add support for target branch

Have targets in use for the same hosting account . so need to mention target branch for each branch. Please add the support .

Facing this ENOENT error ~ this morning

@lowply

`Sending build context to Docker daemon 9.216kB

Step 1/4 : FROM node:10-slim
---> 264968c6acc1
Step 2/4 : RUN npm install -g firebase-tools
---> Running in ea97db582b77
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/firebase-tools/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/DABH/diagnostics.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-22T08_20_32_745Z-debug.log
The command '/bin/sh -c npm install -g firebase-tools' returned a non-zero code: 1

##[error]Docker build failed with exit code 1`

Failed to download action lowply/build-hugo

Hello,
I found your GitHub action on deploying to firebase. But I was unable to successfully apply this action. It keeps on failing with the response that it was unable to download lowply/build-hugo

Current runner version: '2.165.2'
Prepare workflow directory
Prepare all required actions
Download action repository 'actions/checkout@master'
Download action repository 'lowply/[email protected]'
##[warning]Failed to download action 'https://api.github.com/repos/lowply/build-hugo/tarball/v0.0.2'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 20.766 seconds before retry.
##[warning]Failed to download action 'https://api.github.com/repos/lowply/build-hugo/tarball/v0.0.2'. Error Response status code does not indicate success: 404 (Not Found).
##[warning]Back off 13.996 seconds before retry.
##[error]Response status code does not indicate success: 404 (Not Found).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.