Update firebase_hosting.yml #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Firebase Hosting | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Checkout the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# 2. Setup Node.js environment | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # 필요한 Node.js 버전으로 조정 | |
# 3. Install Firebase CLI globally | |
- name: Install Firebase CLI | |
run: npm install -g firebase-tools | |
# 4. Install project dependencies | |
- name: Install Dependencies | |
run: npm install | |
# 5. Build the project | |
- name: Build Project | |
run: npm run build | |
# 6. Deploy to Firebase Hosting | |
- name: Deploy to Firebase Hosting | |
run: firebase deploy --only hosting --project hiarchomepage | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |