-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from softeerbootcamp4th/build/CLAP-51
build(CLAP-51): github merge 액션 개선하기
- Loading branch information
Showing
3 changed files
with
60 additions
and
22 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,57 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy Service to Firebase Hosting on PR | ||
'on': pull_request | ||
on: pull_request | ||
jobs: | ||
|
||
|
||
build_and_preview: | ||
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' | ||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
runs-on: ubuntu-latest | ||
environment: preview | ||
defaults: | ||
run: | ||
working-directory: packages/service | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: technote-space/get-diff-action@v6 | ||
with: | ||
RELATIVE: 'packages/service' | ||
id: git-diff | ||
fetch-depth: 0 | ||
|
||
- run: git branch -a | ||
- name: Make Last Hash | ||
id: last | ||
run: | | ||
LAST_HASH=$(git rev-parse remotes/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.git-diff.outputs.diff | ||
if: ${{ steps.diff-check.outputs.diff }} | ||
run: | | ||
jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' <<< "$SECRETS_CONTEXT" > .env | ||
env: | ||
SECRETS_CONTEXT: ${{ toJson(secrets) }} | ||
|
||
- name: Install Dependencies and Build | ||
if: steps.git-diff.outputs.diff | ||
if: ${{ steps.diff-check.outputs.diff }} | ||
run: | | ||
npm install -g pnpm && pnpm install && pnpm build | ||
- name: Deploy to Firebase Hosting | ||
if: steps.git-diff.outputs.diff | ||
if: ${{ steps.diff-check.outputs.diff }} | ||
uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_WATERMELON_CLAP }}' | ||
projectId: watermelon-clap | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WATERMELON_CLAP }} | ||
projectId: watermelon-clap |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ export const MainPage = () => { | |
right: 20px; | ||
`} | ||
> | ||
개발 | ||
개발ㄴ | ||
</Link> | ||
</div> | ||
); | ||
|