Hotfix/rollback/yarn #31
Workflow file for this run
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 Shared Live Channel | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- closed | |
paths: | |
- "apps/shared/**" | |
- ".github/workflows/gdsc-dju-shared-deploy-live.yml" | |
jobs: | |
Deploy_Live_channel: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./apps/shared | |
environment: | |
name: GDSC DJU Shared Production | |
url: https://shared.gdscdju.dev | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 캐시 폴더를 가져오고 있어요. | |
id: yarn-cache-dir-path | |
run: echo "dir=$(cd client && yarn config get cacheFolder)" >> $GITHUB_ENV | |
- name: 캐시 의존성을 설정하고 있어요. | |
uses: actions/cache@v3 | |
with: | |
path: ~/.yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Node 버전/캐싱여부를 설정하고 있어요. | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: yarn | |
cache-dependency-path: ./yarn.lock | |
registry-url: "https://registry.yarnpkg.com" | |
- name: Setting .env | |
run: | | |
echo "VITE_FIREBASE_API_KEY=${{ secrets.VITE_FIREBASE_API_KEY }}" >> .env | |
echo "VITE_FIREBASE_AUTH_DOMAIN=${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }}" >> .env | |
echo "VITE_FIREBASE_DATABASE_URL=${{ secrets.VITE_FIREBASE_DATABASE_URL }}" >> .env | |
echo "VITE_FIREBASE_PROJECT_ID=${{ secrets.VITE_FIREBASE_PROJECT_ID }}" >> .env | |
echo "VITE_FIREBASE_STORAGE_BUCKET=${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }}" >> .env | |
echo "VITE_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}" >> .env | |
echo "VITE_FIREBASE_APPID=${{ secrets.VITE_FIREBASE_APPID }}" >> .env | |
echo "VITE_FIREBASE_MEASUREMENT_ID=${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}" >> .env | |
cat .env | |
working-directory: ${{ env.working-directory }} | |
- name: install package | |
run: yarn install | |
- name: Project Build | |
run: yarn turbo build --filter @gdsc-dju/shared | |
- uses: HyeokE/action-hosting-deploy@main | |
id: run_firebase_deploy | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GDSC_DJU }}' | |
channelId: live | |
projectId: gdsc-dju | |
target: gdsc-dju-share | |
entryPoint: ${{ env.working-directory }} | |
- name: Discord Message Notify | |
uses: appleboy/[email protected] | |
with: | |
webhook_id: ${{ secrets.DISCORD_SHARED_WEBHOOK_ID }} | |
webhook_token: ${{ secrets.DISCORD_SHARED_WEBHOOK_TOKEN }} | |
color: "#4285f4" | |
args: | | |
gdsc-dju-shared has been deployed to Live channel | |
`Contributor` ${{github.actor}} | |
`Event Status` ${{github.event_name}} | |
`URL` https://shared.gdscdju.dev | |
`Build Time` ${{steps.run_firebase_deploy.outputs.expire_time}} |