Update CI #252
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
jobs: | |
lint-test-build: | |
name: Lint, Unit Test and Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Read .node-version | |
id: node-version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ./.node-version | |
- name: Use Node.js ${{ steps.node-version.outputs.content }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.node-version.outputs.content }} | |
cache: 'npm' | |
- name: Install | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Generate | |
run: npm run generate | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist | |
if-no-files-found: error | |
deploy: | |
name: Deploy | |
needs: lint-test-build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Read .node-version | |
id: node-version | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: ./.node-version | |
- name: Use Node.js ${{ steps.node-version.outputs.content }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ steps.node-version.outputs.content }} | |
cache: 'npm' | |
- name: Install | |
run: npm ci | |
- name: Download Artifact | |
uses: actions/download-artifact@master | |
with: | |
name: dist | |
path: dist | |
- name: Deploy to Firebase | |
uses: w9jds/firebase-action@master | |
with: | |
args: deploy --only hosting | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |