gitactions deploy.yml 추가
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
name: Deploy Quartz
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master # 본인이 사용하는 메인 브랜치명으로 수정하세요
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install & Build
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npx quartz build
|
||||||
|
|
||||||
|
- name: Deploy to GCE
|
||||||
|
uses: appleboy/scp-action@master
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.GCE_HOST }}
|
||||||
|
username: ${{ secrets.GCE_USERNAME }}
|
||||||
|
key: ${{ secrets.GCE_SSH_KEY }}
|
||||||
|
source: "public/*"
|
||||||
|
target: "/home/dihwang/white-smith-blog/public" # GCE 서버의 웹 서버 경로
|
||||||
|
strip_components: 1
|
||||||
Reference in New Issue
Block a user