Merge pull request #277 from SaekKkanDa/develop #30
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
# This file was auto-generated by the Firebase CLI | |
# https://github.com/firebase/firebase-tools | |
name: Deploy to Firebase Hosting on merge | |
'on': | |
push: | |
branches: | |
- production | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Read .nvmrc | |
id: node_version | |
run: echo ::set-output name=NODE_VERSION:$(cat .nvmrc) | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{steps.node_version.outputs.NODE_VERSION}} | |
- name: Adding environments to .env | |
run: | | |
echo -e "\\n | |
NEXT_PUBLIC_FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}\n\ | |
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=${{ vars.FIREBASE_AUTH_DOMAIN }}\n\ | |
NEXT_PUBLIC_FIREBASE_DATABASE_URL=${{ vars.FIREBASE_DATABASE_URL }}\n\ | |
NEXT_PUBLIC_FIREBASE_PROJECT_ID=${{ vars.FIREBASE_PROJECT_ID }}\n\ | |
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=${{ vars.FIREBASE_STORAGE_BUCKET }}\n\ | |
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=${{ vars.FIREBASE_MEASUREMENT_ID }}\n\ | |
NEXT_PUBLIC_FIREBASE_APP_ID=${{ vars.FIREBASE_APP_ID }}\n\ | |
NEXT_PUBLIC_KAKAO_API_KEY=${{ secrets.KAKAO_API_KEY }}\n\ | |
NEXT_PUBLIC_SENTRY_DSN=${{ vars.SENTRY_DSN }}\n\ | |
SENTRY_AUTH_TOKEN=${{secrets.SENTRY_AUTH_TOKEN}}\n\ | |
PROD=${{ true }}" >> ".env" | |
- name: Debugging .env fle | |
run: cat ".env" | |
- name: Install dependencies | |
run: yarn install | |
- name: Build application | |
run: yarn run build | |
- name: Deploy | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_OPPAMANYCOLORTONE_5FB42 }}' | |
channelId: live | |
projectId: oppamanycolortone-5fb42 | |
env: | |
FIREBASE_CLI_EXPERIMENTS: webframeworks |