Skip to content

Commit

Permalink
Merge pull request #136 from mafia-together/chore/#135-prod-CICD
Browse files Browse the repository at this point in the history
chore : prod CI/CD 작성
  • Loading branch information
waterricecake authored Oct 17, 2024
2 parents 3a5365c + e324aa6 commit 834c94b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/frontend-prod-CICD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Prod CI/CD

on:
push:
branches: [ prod ]

permissions:
contents: read

jobs:
build:
runs-on:
group: Default
labels: [ self-hosted, dev ]
permissions:
pull-requests: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run build
run: npm run build

- name: Copy to Prod Server
uses: appleboy/scp-action@master
with:
username: ${{ secrets.PROD_USER_NAME }}
host: ${{ secrets.PROD_SERVER }}
key: ${{ secrets.PROD_PEM_KEY }}
source: "./dist"
target: "~/"

0 comments on commit 834c94b

Please sign in to comment.