Skip to content

Commit

Permalink
feat: 깃허브 액션에 env 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
cheonjiyun committed Dec 22, 2024
1 parent cfb92cf commit 4aa56ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/frontend-dev-CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Dev CI/CD

on:
push:
branches: [ dev ]
branches: [dev]

permissions:
contents: read
Expand All @@ -11,7 +11,7 @@ jobs:
build:
runs-on:
group: Default
labels: [ self-hosted, dev ]
labels: [self-hosted, dev]
permissions:
pull-requests: write

Expand All @@ -29,6 +29,8 @@ jobs:

- name: Run build
run: npm run build
env:
VITE_DOMAIN: ${{ secrets.VITE_DOMAIN_DEV }}

- name: 빌드 파일
run: cp -rf ./dist ~/
run: cp -rf ./dist ~/
10 changes: 6 additions & 4 deletions .github/workflows/frontend-prod-CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Prod CI/CD

on:
push:
branches: [ prod ]
branches: [prod]

permissions:
contents: read
Expand All @@ -11,7 +11,7 @@ jobs:
build:
runs-on:
group: Default
labels: [ self-hosted, dev ]
labels: [self-hosted, dev]
permissions:
pull-requests: write

Expand All @@ -29,12 +29,14 @@ jobs:

- name: Run build
run: npm run build
env:
VITE_DOMAIN: ${{ secrets.VITE_DOMAIN_PROD }}

- 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: "~/"
source: './dist'
target: '~/'

0 comments on commit 4aa56ad

Please sign in to comment.