Skip to content

Commit

Permalink
update firebase deploy on pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffGreiner-eaton committed Dec 11, 2024
1 parent d07c60b commit 3d069bd
Show file tree
Hide file tree
Showing 4 changed files with 2,998 additions and 67 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
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
env:
REACT_APP_DOCIT_GITHUB_TOKEN: ${{ secrets.REACT_APP_DOCIT_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: yarn && yarn build
- uses: emclaug2/action-hosting-deploy@main
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_DOC_IT }}'
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLUI_DOC_IT }}
expires: 2d
projectId: blui-doc-it
24 changes: 14 additions & 10 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"hosting": {
"public": "build",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-react": "^7.33.2",
"firebase-tools": "^13.28.0",
"markdown-link-check": "^3.8.0",
"natural": "^5.0.0",
"prettier": "^2.8.0",
Expand Down
Loading

0 comments on commit 3d069bd

Please sign in to comment.