hotfix: 아이폰에서 배너이미지가 화면에 꽉 차는 이슈 #271
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 Service to Firebase Hosting on PR | |
on: pull_request | |
jobs: | |
build_and_preview: | |
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
runs-on: ubuntu-latest | |
environment: service-preview | |
defaults: | |
run: | |
working-directory: packages/service | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Make Last Hash | |
id: last | |
run: | | |
LAST_HASH=$(git rev-parse origin/main:packages/service) | |
echo "::set-output name=hash::$LAST_HASH" | |
- name: Make Current Hash | |
id: current | |
run: | | |
CURRENT_HASH=$(git rev-parse HEAD:packages/service) | |
echo "::set-output name=hash::$CURRENT_HASH" | |
- name: Set Diff | |
id: diff-check | |
run: | | |
if [ "${{ steps.last.outputs.hash }}" != "${{ steps.current.outputs.hash }}" ]; then | |
echo "::set-output name=diff::true" | |
else | |
echo "::set-output name=diff::false" | |
fi | |
- name: Create .env file | |
if: ${{ steps.diff-check.outputs.diff == 'true' }} | |
run: | | |
jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' <<< "$VARS_CONTEXT" > .env | |
env: | |
VARS_CONTEXT: ${{ toJson(vars) }} | |
- name: Install Dependencies and Build | |
if: ${{ steps.diff-check.outputs.diff == 'true' }} | |
run: | | |
npm install -g pnpm && pnpm install && pnpm build | |
- name: Deploy to Firebase Hosting | |
if: ${{ steps.diff-check.outputs.diff == 'true' }} | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
id: deploy | |
with: | |
target: service | |
repoToken: ${{ secrets.GITHUB_TOKEN }} | |
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WATERMELON_CLAP }} | |
projectId: watermelon-clap | |
- name: Comment PR | |
if: ${{ steps.diff-check.outputs.diff == 'true'}} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
Finish "service" deployment! | |
comment_tag: service-excution | |