Skip to content

revert make envfile step and add webpack configuration to load the en… #24

revert make envfile step and add webpack configuration to load the en…

revert make envfile step and add webpack configuration to load the en… #24

name: Firebase CI
on:
push:
branches: main
jobs:
create-envfile:
runs-on: ubuntu-latest
steps:
- name: Make envfile
run: |
touch .env
echo EMAIL_API_KEY=${{ secrets.EMAIL_API_KEY }} >> .env
echo EMAIL_FROM=${{ secrets.EMAIL_FROM }} >> .env
echo EMAIL_TO=${{ secrets.EMAIL_TO }} >> .env
echo TEMPLATE_ID=${{ secrets.TEMPLATE_ID }} >> .env
build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js version ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm install -g firebase-tools
- run: npm run build
- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
deploy:
name: deploy
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Build
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Deploy to Firebase
uses: w9jds/firebase-action@v12.4.0
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}