Skip to content

Update workflow.yml

Update workflow.yml #3

Workflow file for this run

#information: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: CI/CD Workflow
on:
push:
branches:
- main
env:
CI: false
jobs:
setup-node:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14 # Adjust the Node.js version as needed
run-cypress:
runs-on: ubuntu-latest
needs: setup-node
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Cypress run
uses: cypress-io/github-action@v6
with:
# build: CI='' npm run build
start: npm run start
wait-on: 'http://localhost:3000'
deploy:
runs-on: ubuntu-latest
needs: run-cypress
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLANK_MAP_CLIENT }}'
channelId: live
projectId: blank-map-client
# jobs:
# deploy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: akhileshns/[email protected]
# if: contains(github.ref, 'main')
# with:
# heroku_api_key: ${{secrets.HEROKU_API_KEY}}
# heroku_app_name: blankmap-front
# heroku_email: [email protected]