From 44ca5bd16b83cb3112893b5ef9ac0eeb366f504a Mon Sep 17 00:00:00 2001 From: claustra01 Date: Mon, 5 Aug 2024 23:21:05 +0900 Subject: [PATCH 1/3] refactor: deploy workflow --- ...loy-to-firebase-hosting.yml => deploy.yml} | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) rename .github/workflows/{deploy-to-firebase-hosting.yml => deploy.yml} (64%) diff --git a/.github/workflows/deploy-to-firebase-hosting.yml b/.github/workflows/deploy.yml similarity index 64% rename from .github/workflows/deploy-to-firebase-hosting.yml rename to .github/workflows/deploy.yml index ee7a7bb..1250829 100644 --- a/.github/workflows/deploy-to-firebase-hosting.yml +++ b/.github/workflows/deploy.yml @@ -1,17 +1,26 @@ -name: Deploy to Firebase Hosting +name: deploy on: push: - branches: - - main + # branches: + # - main jobs: - build_and_deploy: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - run: | + npm install + npm run build + + deploy: + needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm install && npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: From 229d5c755120d4b1c99f3a4b8a89a53f332b1820 Mon Sep 17 00:00:00 2001 From: claustra01 Date: Mon, 5 Aug 2024 23:24:02 +0900 Subject: [PATCH 2/3] fix: yaml format --- .github/workflows/deploy.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1250829..0ee6e29 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,21 +6,14 @@ on: # - main jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - run: | - npm install - npm run build - deploy: - needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: | + npm install + npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: From 38353e2b173c2b9709d51bec3eae5457fe70dab4 Mon Sep 17 00:00:00 2001 From: claustra01 Date: Mon, 5 Aug 2024 23:25:29 +0900 Subject: [PATCH 3/3] update: enable deploy only main branch --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0ee6e29..72c9908 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,8 @@ name: deploy on: push: - # branches: - # - main + branches: + - main jobs: deploy: