diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/deploy-alpha.yml similarity index 76% rename from .github/workflows/firebase-hosting-merge.yml rename to .github/workflows/deploy-alpha.yml index 6ca65b2..74e6a4f 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/deploy-alpha.yml @@ -1,11 +1,11 @@ -# mainブランチへのマージ時に、指定のチャンネルへのデプロイを行います。 +# developブランチへのマージ時にalphaチャンネルへのデプロイを行います。 -name: Deploy to Firebase Hosting on merge +name: Deploy Alpha Channel on: workflow_dispatch: push: branches: - - master + - develop jobs: build_and_deploy: environment: production @@ -14,7 +14,7 @@ jobs: run: working-directory: Hosting steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci && npm run build env: MAPS_JS_API: ${{ secrets.MAPS_JS_API }} diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 0000000..14239cd --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,27 @@ +# masterブランチへのマージ時に公開サイトへのデプロイを行います。 + +name: Deploy Production +on: + workflow_dispatch: + push: + branches: + - master +jobs: + build_and_deploy: + environment: production + runs-on: ubuntu-latest + defaults: + run: + working-directory: Hosting + steps: + - uses: actions/checkout@v4 + - run: npm ci && npm run build + env: + MAPS_JS_API: ${{ secrets.MAPS_JS_API }} + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_GALLERY_FOUND }} + entryPoint: ./Hosting + channelId: live + projectId: gallery-found