File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to Firebase Hosting
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build_and_deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 20
20+
21+ # 환경변수 생성하기
22+ - name : Create .env.production
23+ run : |
24+ echo "PUBLIC_FIREBASE_API_KEY=${{ secrets.PUBLIC_FIREBASE_API_KEY }}" >> .env.production
25+ echo "PUBLIC_FIREBASE_AUTH_DOMAIN=${{ secrets.PUBLIC_FIREBASE_AUTH_DOMAIN }}" >> .env.production
26+ echo "PUBLIC_FIREBASE_PROJECT_ID=${{ secrets.PUBLIC_FIREBASE_PROJECT_ID }}" >> .env.production
27+ echo "PUBLIC_FIREBASE_STORAGE_BUCKET=${{ secrets.PUBLIC_FIREBASE_STORAGE_BUCKET }}" >> .env.production
28+ echo "PUBLIC_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}" >> .env.production
29+ echo "PUBLIC_FIREBASE_APP_ID=${{ secrets.PUBLIC_FIREBASE_APP_ID }}" >> .env.production
30+
31+ # 의존성 설치
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ # 빌드 실행
36+ - name : Build SvelteKit
37+ run : npm run build
38+
39+ # Firebase Hosting 배포
40+ - name : Deploy to Firebase Hosting
41+ uses : FirebaseExtended/action-hosting-deploy@v0
42+ with :
43+ repoToken : ${{ secrets.GITHUB_TOKEN }}
44+ firebaseServiceAccount : ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
45+ projectId : ${{ secrets.FIREBASE_PROJECT_ID }}
46+ channelId : live
You can’t perform that action at this time.
0 commit comments