Skip to content

Commit

Permalink
Merge pull request #14 from FltSv/13-hosting-auto-deploy
Browse files Browse the repository at this point in the history
#13 Actionsを使用した自動デプロイ構築
  • Loading branch information
FltSv authored Nov 5, 2023
2 parents 9edac54 + b362ecf commit e37e36d
Show file tree
Hide file tree
Showing 5 changed files with 9,655 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# mainブランチへのマージ時に、指定のチャンネルへのデプロイを行います。

name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GALLERY_FOUND }}'
entryPoint: ./Hosting
expires: 30d
channelId: alpha
projectId: gallery-found
17 changes: 17 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# PR作成時に、PRのプレビューチャンネルを作成・デプロイを行います。

name: Deploy 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
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GALLERY_FOUND }}'
entryPoint: ./Hosting
projectId: gallery-found
4 changes: 3 additions & 1 deletion Hosting/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,7 @@ node_modules/
# Webpack
/public/bundle.js
/app.js
/package-lock.json
/firebase-config.json

# OS Auto Generate File
*.DS_Store
Loading

0 comments on commit e37e36d

Please sign in to comment.