-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.79 KB
/
Copy pathworkflow.yml
File metadata and controls
60 lines (54 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#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/heroku-deploy@v3.12.14
# if: contains(github.ref, 'main')
# with:
# heroku_api_key: ${{secrets.HEROKU_API_KEY}}
# heroku_app_name: blankmap-front
# heroku_email: zqqyoung@gmail.com