separated build and deploy

This commit is contained in:
Kim, Jimin 2021-05-17 23:27:33 +09:00
parent 3021ce3bfc
commit fc4b13f265

View file

@ -4,14 +4,37 @@ on:
branches: branches:
- dev - dev
jobs: jobs:
build_and_deploy: build:
name: Build and Deploy name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@master uses: actions/checkout@master
- name: Install dependencies and build site - name: Install Dependencies and Build
run: cd source && yarn install && yarn build run: cd source && yarn install && yarn build
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: build
path: build
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: build
path: build
- name: Set target
uses: w9jds/firebase-action@master
with:
args: use developomp-site
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Apply target - name: Apply target
uses: w9jds/firebase-action@master uses: w9jds/firebase-action@master
with: with:
@ -21,6 +44,6 @@ jobs:
- name: Deploy to Firebase - name: Deploy to Firebase
uses: w9jds/firebase-action@master uses: w9jds/firebase-action@master
with: with:
args: deploy --only hosting args: deploy --only hosting:dev
env: env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}