Skip to content

Commit

Permalink
deploy_firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
johnycampos committed Jun 14, 2024
1 parent bf3a209 commit 688fcf0
Show file tree
Hide file tree
Showing 8 changed files with 347 additions and 18 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=http://localhost:5000
284 changes: 284 additions & 0 deletions .firebase/hosting.ZGlzdA.cache

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "testevue3-c7eec"
}
}
19 changes: 19 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TESTEVUE3_C7EEC }}
channelId: live
projectId: testevue3-c7eec
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
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 }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TESTEVUE3_C7EEC }}
projectId: testevue3-c7eec
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
2 changes: 1 addition & 1 deletion src/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const onSubmit = () => {
>
<VCardText>
<h5 class="text-h5 font-weight-semibold mb-1">
Bem vindo à loja👋🏻
Bem vindo à loja Teste👋🏻
</h5>
<p class="mb-0" />
</VCardText>
Expand Down
18 changes: 1 addition & 17 deletions src/server/ApiConfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'

const API_URL = 'http://localhost:5000'
const API_URL = import.meta.env.VITE_API_URL

const API = axios.create({
baseURL: API_URL,
Expand All @@ -14,21 +14,5 @@ const API = axios.create({
'Access-Control-Allow-Methods': 'GET,PUT,POST,DELETE,PATCH,OPTIONS',
},
})

// API.interceptors.request.use(
// config => {
// // Do something before request is sent

// const accessToken = localStorage.getItem('token')

// // eslint-disable-next-line no-param-reassign
// if (accessToken) config.headers.Authorization = `Bearer ${accessToken}`
// config.headers.dataSession = localStorage.getItem('data')

// return config
// },
// error => Promise.reject(error),
// )

export { API, API_URL }

0 comments on commit 688fcf0

Please sign in to comment.