Skip to content

Commit

Permalink
Split steps into jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoder committed Oct 24, 2023
1 parent d1cdc79 commit 95db038
Showing 1 changed file with 30 additions and 22 deletions.
52 changes: 30 additions & 22 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Deploy to Stage
name: Continuous Integration

on: [push, pull_request]

jobs:
build:

Build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.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: yarn install && yarn build
- run: yarn release
outputs:
status: ${{ steps.build.outcome }}

Deploy-to-staging:
needs: Build
if: needs.Build.outputs.status == 'success' && github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn deploy:staging --token ${{ secrets.FIREBASE_TOKEN }}

Upload-artefact-for-Chrome-Extension:
needs: Build
if: needs.Build.outputs.status == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install && yarn build
- run: yarn release
- name: Deploy to staging
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' # This conditional will skip the step for Dependabot PRs
run: yarn deploy:staging --token ${{ secrets.FIREBASE_TOKEN }}
- name: Upload artifacts # Find artifacts under actions/jobs
uses: actions/upload-artifact@v2
with:
name: chrome-extension
path: extension
- uses: actions/checkout@v2
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: chrome-extension
path: extension

0 comments on commit 95db038

Please sign in to comment.