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

Bug/deploy bug 147 #153

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 2 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
VITE_ALGOLIA_APP_ID: ${{ secrets.VITE_ALGOLIA_APP_ID}}
VITE_ALGOLIA_SEARCH_API_KEY: ${{secrets.VITE_ALGOLIA_SEARCH_API_KEY}}
run: bun run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ jobs:
- run: bun install
- name: Build
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }}
VITE_FIREBASE_PROJECT_ID: ${{ secrets.VITE_FIREBASE_PROJECT_ID }}
VITE_FIREBASE_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
VITE_ALGOLIA_APP_ID: ${{ secrets.VITE_ALGOLIA_APP_ID}}
VITE_ALGOLIA_SEARCH_API_KEY: ${{secrets.VITE_ALGOLIA_SEARCH_API_KEY}}
run: bun run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/push-to-another-repository.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: git push into another repo to deploy repo

on:
push:
branches: [develop]

jobs:
build:
runs-on: ubuntu-latest
container: pandoc/latex
steps:
- uses: actions/checkout@v2
- name: Install mustache (to update the date)
run: apk add ruby && gem install mustache
- name: creates output
run: sh ./build.sh
- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.AUTO_ }}
with:
source-directory: 'output'
destination-github-username: nakyeonko3
destination-repository-name: pli
user-email: ${{ secrets.OFFICIAL_ACCOUNT_EMAIL }}
commit-message: ${{ github.event.commits[0].message }}
target-branch: main
- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
cd ../
mkdir output
cp -R ./Toy_Project_3_team4/* ./output
cp -R ./output ./Toy_Project_3_team4/
31 changes: 19 additions & 12 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"env": {
"VITE_FIREBASE_API_KEY": "${VITE_FIREBASE_API_KEY}",
"VITE_FIREBASE_AUTH_DOMAIN": "${VITE_FIREBASE_AUTH_DOMAIN}",
"VITE_FIREBASE_PROJECT_ID": "${VITE_FIREBASE_PROJECT_ID}",
"VITE_FIREBASE_STORAGE_BUCKET": "${VITE_FIREBASE_STORAGE_BUCKET}",
"VITE_FIREBASE_MESSAGING_SENDER_ID": "${VITE_FIREBASE_MESSAGING_SENDER_ID}",
"VITE_FIREBASE_APP_ID": "${VITE_FIREBASE_APP_ID}",
"VITE_FIREBASE_MEASUREMENT_ID": "${VITE_FIREBASE_MEASUREMENT_ID}",
"VITE_ALGOLIA_APP_ID": "${VITE_ALGOLIA_APP_ID}",
"VITE_ALGOLIA_SEARCH_API_KEY": "${VITE_ALGOLIA_SEARCH_API_KEY}"
}
},
"firestore": {
"rules": "firestore.rules",
Expand All @@ -15,13 +28,7 @@
{
"source": "functions",
"codebase": "default",
"ignore": [
"node_modules",
".git",
"firebase-debug.log",
"firebase-debug.*.log",
"*.local"
],
"ignore": ["node_modules", ".git", "firebase-debug.log", "firebase-debug.*.log", "*.local"],
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
Expand Down
Loading
Loading