Skip to content

Commit

Permalink
Use GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jixor committed Mar 4, 2022
1 parent 11a4dcc commit de74adc
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 29 deletions.
16 changes: 0 additions & 16 deletions .circleci/config.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

env:
NODE_ENV: production

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [17.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test -- --coverage
- run: npm run build
- uses: actions/upload-artifact@v2
with:
name: build
path: build

preview:
needs: build
runs-on: ubuntu-latest
if: github.event.pull_request.base.ref == 'master'
outputs:
details_url: ${{ steps.deployPreview.outputs.details_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: build
path: build
- uses: FirebaseExtended/action-hosting-deploy@v0
id: deployPreview
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MARGNI_NOTE }}'
projectId: margni-note
env:
FIREBASE_CLI_PREVIEWS: hostingchannels

deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: build
path: build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MARGNI_NOTE }}'
channelId: live
projectId: margni-note
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

0 comments on commit de74adc

Please sign in to comment.