Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Hostingの自動デプロイ設定を最新化 #96

Merged
merged 5 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
build/
dist/
public/
**/coverage/
**/node_modules/
**/*.min.js
*.config.js
.*lintrc.js
.*lintrc.cjs
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
'plugin:react-hooks/recommended',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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-22.04
timeout-minutes: 5

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: npm
cache-dependency-path: './package-lock.json'

- name: Package Clean Install
run: npm ci

- name: Build
env:
VITE_APP_KEY: ${{ secrets.REACT_APP_APP_KEY }}
VITE_AUTH_DOMAIN: ${{ secrets.REACT_APP_AUTH_DOMAIN }}
VITE_DATABASE_URL: ${{ secrets.REACT_APP_DATABASE_URL }}
VITE_PROJECT_ID: ${{ secrets.REACT_APP_PROJECT_ID }}
VITE_STORAGEBUCKET: ${{ secrets.REACT_APP_STORAGEBUCKET }}
VITE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_MESSAGING_SENDER_ID }}
VITE_APP_ID: ${{ secrets.REACT_APP_APP_ID }}
VITE_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
run: npm run build

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_JIGSAW_LIKE_PUZZLE }}'
projectId: jigsaw-like-puzzle
10 changes: 5 additions & 5 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
VITE_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }}
run: npm run build

- name: Deploy to Firebase Hosting
uses: w9jds/firebase-action@v2.0.0
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
args: deploy --only hosting --message \"${{ github.event.head_commit.message }}\"
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_JIGSAW_LIKE_PUZZLE }}'
channelId: live
projectId: jigsaw-like-puzzle

- name: Slack Notification
uses: 8398a7/action-slack@v3
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
- icon:5.4.2 -> 5.14.8
- React Konva: 17.0.2-5 -> 18.2.10

### Development Changed
- Firebase Hosting の自動デプロイJOBを最新化(#95)
- デプロイプレビューが利用できるように

## v1.1.0(2022/02/20)
### Updated
- 各種ライブラリのアプデ(#66)
Expand Down
8 changes: 2 additions & 6 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
Expand Down
Loading