Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @DawidvanGraan DawidvanGraan renamed this gist Mar 13, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @DawidvanGraan DawidvanGraan revised this gist Mar 13, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,8 @@ To run the `firebase deploy` command you need to obtain a login token from Fireb
    Goto your project in Bitbucket, open the Settings and select Environment variables.
    Create a new variable with FIREBASE_TOKEN as the key and paste in the token as the value. Save the configuration.

    ## Create the `bitbucket-pipelines.yml` the branch you want to deploy
    ## Pipelines file
    Create a `bitbucket-pipelines.yml` in branch you want to deploy.

    image: node:7.4.0

  3. @DawidvanGraan DawidvanGraan created this gist Mar 13, 2017.
    29 changes: 29 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    Deploy your Angular 2 project with Bitbucket Pipelines to Firebase Hosting

    ## Firebase
    Please see the Firebase setup instruction to setup a project on Firebase.

    ## Firebase CI Token
    To run the `firebase deploy` command you need to obtain a login token from Firebase. To do so, run the `firebase login:ci` on your command line which will generate a token. Copy the generated token.

    ## Environment Variables
    Goto your project in Bitbucket, open the Settings and select Environment variables.
    Create a new variable with FIREBASE_TOKEN as the key and paste in the token as the value. Save the configuration.

    ## Create the `bitbucket-pipelines.yml` the branch you want to deploy

    image: node:7.4.0

    pipelines:
    default:
    - step:
    script:
    - npm install -g @angular/cli
    - npm install -g firebase-tools
    - npm install
    - ng build --env=prod
    - firebase deploy --only hosting --token "$FIREBASE_TOKEN"

    ## Deploy
    After a commit on your branch, the pipeline with deploy your changes to Firebase.