Skip to content

frontend-main-deploy #1

frontend-main-deploy

frontend-main-deploy #1

name: frontend-main-deploy
on:
workflow_dispatch:
defaults:
run:
working-directory: ./frontend
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
token: ${{ secrets.SUBMODULE_JAEHEE329 }}
submodules: true
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Test & Build
run: yarn build
- name: Story book build
run: yarn build-storybook
- name: Scp html
uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.HOST_WS }}
key: ${{ secrets.PRIVATE_KEY_WS }}
source: "./frontend/dist/*"
target: "/home/ubuntu/frontend-production/html"
strip_components: 1
- name: Scp story book
uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.HOST_WS }}
key: ${{ secrets.PRIVATE_KEY_WS }}
source: "./frontend/storybook-static/*"
target: "/home/ubuntu/frontend-production/storybook"
strip_components: 1
- name: action-slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
author_name: Github Action # default: 8398a7@action-slack
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always()