hotfix : babel #4
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 GDSC DJU Preview Channel | |
on: | |
push: | |
branches-ignore: | |
- master | |
pull_request: | |
branches-ignore: | |
- master | |
- develop | |
jobs: | |
Deploy_preview_channel: | |
runs-on: ubuntu-latest | |
environment: | |
name: GDSC DJU Preview | |
url: ${{ steps.run_firebase_preview.outputs.details_url }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Node 버전/캐싱여부를 설정하고 있어요. | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Setting .env | |
run: | | |
echo "FIREBASE_API_KEY=${{ secrets.FIREBASE_API_KEY }}" >> .env | |
echo "FIREBASE_AUTH_DOMAIN=${{ secrets.FIREBASE_AUTH_DOMAIN }}" >> .env | |
echo "FIREBASE_DATABASE_URL=${{ secrets.FIREBASE_DATABASE_URL }}" >> .env | |
echo "FIREBASE_PROJECT_ID=${{ secrets.FIREBASE_PROJECT_ID }}" >> .env | |
echo "FIREBASE_STORAGE_BUCKET=${{ secrets.FIREBASE_STORAGE_BUCKET }}" >> .env | |
echo "FIREBASE_MESSAGING_SENDER_ID=${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}" >> .env | |
echo "FIREBASE_APPID=${{ secrets.FIREBASE_APPID }}" >> .env | |
echo "FIREBASE_MEASUREMENT_ID=${{ secrets.FIREBASE_MEASUREMENT_ID }}" >> .env | |
cat .env | |
- name: Project yarn install | |
run: yarn install | |
- name: Project Build | |
run: yarn build | |
- name: Get short SHA | |
id: slug | |
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | |
- uses: HyeokE/action-hosting-deploy@main | |
id: run_firebase_preview | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GDSC_DJU }}' | |
projectId: gdsc-dju | |
target: gdsc-dju-preview | |
expires: 3d | |
channelId: ' ${{ steps.slug.outputs.sha8 }}-${{ github.event.pull_request.head.ref }} ' | |
env: | |
FIREBASE_CLI_PREVIEWS: hostingchannels | |
- name: Discord Message Notify | |
uses: appleboy/[email protected] | |
with: | |
webhook_id: ${{ secrets.DISCORD_ADMIN_WEBHOOK_ID }} | |
webhook_token: ${{ secrets.DISCORD_ADMIN_WEBHOOK_TOKEN }} | |
color: '#4285f4' | |
args: | | |
gdsc-dju-admin has been deployed to Preview channel | |
`Contributor`: ${{github.actor}} | |
`Event Status` ${{github.event_name}} | |
`URL` <${{steps.run_firebase_preview.outputs.details_url}}> | |
`Build Time` ${{steps.run_firebase_preview.outputs.expire_time}} |