Skip to content

Commit

Permalink
fix: set deploy on tag push and fix firebase-tools install
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSolati committed Jun 8, 2020
1 parent 886cd28 commit ac41003
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Deploy
on:
release:
types: [published]
push:
tags:
- v*
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
deploy_to_npm:
name: Deploy to NPM
Expand All @@ -17,6 +19,12 @@ jobs:
with:
node-version: 12.x
registry-url: https://registry.npmjs.org/
- name: Register Token
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > /home/runner/work/_temp/.npmrc
echo "_auth=$NPM_TOKEN" >> /home/runner/work/_temp/.npmrc
echo "email=$NPM_EMAIL" >> /home/runner/work/_temp/.npmrc
echo "always-auth=true" >> /home/runner/work/_temp/.npmrc
- name: Install
run: npm i
- name: Build
Expand All @@ -34,7 +42,8 @@ jobs:
with:
node-version: 12.x
- name: Install
run: npm ci
run: npm i
- name: Install Firebase Tools
run: npm i -g firebase-tools
- name: Deploy
run: firebase deploy --non-interactive --token $FIREBASE_TOKEN
Expand Down

0 comments on commit ac41003

Please sign in to comment.