mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 02:35:08 +02:00
Functions ci
This commit is contained in:
parent
e44e0ad34a
commit
145841fc45
43
.github/workflows/deploy-functions.yml
vendored
Normal file
43
.github/workflows/deploy-functions.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
name: Deploy function updates ( main )
|
||||
|
||||
on:
|
||||
# Trigger: on new tag push
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- '.github/workflows/deploy-minter.yml'
|
||||
- 'functions/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Publish changes
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Get the repo files from current commit
|
||||
- name: Cloning repository
|
||||
uses: actions/checkout@v1
|
||||
|
||||
# Install frontend dependencies based on nvmrc
|
||||
- name: Read .nvmrc
|
||||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
|
||||
id: nvmfunctions
|
||||
working-directory: functions
|
||||
|
||||
- name: Set Node.js (.nvmrc)
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ steps.nvmfunctions.outputs.NVMRC }}"
|
||||
|
||||
- name: Install functions dependencies
|
||||
run: npm i
|
||||
working-directory: functions
|
||||
|
||||
- name: Deploy to Firebase
|
||||
uses: w9jds/firebase-action@master
|
||||
with:
|
||||
args: deploy --only=functions
|
||||
env:
|
||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user