Skip to content

Commit

Permalink
Merge branch 'master' of github.com:AstroCorp/Ace-Books-Frontend into…
Browse files Browse the repository at this point in the history
… feat/reset-and-verify
  • Loading branch information
AstroCorp committed Oct 14, 2024
2 parents b979040 + 7ff7c90 commit af55faa
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Fix Vercel Environment Information
run: grep -vE '^(# Created by Vercel CLI|NX_DAEMON|TURBO_DOWNLOAD_LOCAL_ENABLED|TURBO_REMOTE_ONLY|TURBO_RUN_SUMMARY|VERCEL|VERCEL_ENV|VERCEL_GIT_COMMIT_AUTHOR_LOGIN|VERCEL_GIT_COMMIT_AUTHOR_NAME|VERCEL_GIT_COMMIT_MESSAGE|VERCEL_GIT_COMMIT_REF|VERCEL_GIT_COMMIT_SHA|VERCEL_GIT_PREVIOUS_SHA|VERCEL_GIT_PROVIDER|VERCEL_GIT_PULL_REQUEST_ID|VERCEL_GIT_REPO_ID|VERCEL_GIT_REPO_OWNER|VERCEL_GIT_REPO_SLUG|VERCEL_URL)' .vercel/.env.preview.local > .vercel/.env && rm .vercel/.env.preview.local
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Fix Vercel Environment Information
run: grep -vE '^(# Created by Vercel CLI|NX_DAEMON|TURBO_DOWNLOAD_LOCAL_ENABLED|TURBO_REMOTE_ONLY|TURBO_RUN_SUMMARY|VERCEL|VERCEL_ENV|VERCEL_GIT_COMMIT_AUTHOR_LOGIN|VERCEL_GIT_COMMIT_AUTHOR_NAME|VERCEL_GIT_COMMIT_MESSAGE|VERCEL_GIT_COMMIT_REF|VERCEL_GIT_COMMIT_SHA|VERCEL_GIT_PREVIOUS_SHA|VERCEL_GIT_PROVIDER|VERCEL_GIT_PULL_REQUEST_ID|VERCEL_GIT_REPO_ID|VERCEL_GIT_REPO_OWNER|VERCEL_GIT_REPO_SLUG|VERCEL_URL)' .vercel/.env.production.local > .vercel/.env && rm .vercel/.env.production.local
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
Expand Down
22 changes: 19 additions & 3 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,28 @@ export default defineNuxtConfig({
},
app: {
head: {
link: [{ rel: 'icon', type: 'image/png', href: '/favicon.png' }],
link: [
{
rel: 'icon',
type: 'image/png',
href: process.env.NUXT_ENV === "development" ? '/favicon_dev.png' : '/favicon.png',
},
],
},
},
// Github Actions no reconoce correctamente que se hará un deploy a Vercel
// por lo que se debe especificar el preset de Vercel
nitro: {
preset: 'vercel',
},
runtimeConfig: {
// Private keys are only available on the server
// Private keys, se exponen en el servidor
nuxtEnv: process.env.NUXT_ENV,
nuxtSessionName: process.env.NUXT_SESSION_NAME,
nuxtSessionPassword: process.env.NUXT_SESSION_PASSWORD,
nuxtSessionTime: process.env.NUXT_SESSION_TIME,

// Public keys that are exposed to the client
// Public keys, se exponen en el cliente
public: {
backendUrl: process.env.BACKEND_URL,
frontendUrl: process.env.FRONTEND_URL,
Expand Down Expand Up @@ -80,4 +91,9 @@ export default defineNuxtConfig({
alwaysRedirect: true,
},
},
// Para servir nosotros las imágenes y no depender de una API de vercel
image: {
provider: 'ipx',
domains: [process.env.FRONTEND_URL || 'http://localhost:3000'],
},
});
Binary file added src/public/favicon_dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
"installCommand": "yarn install",
"outputDirectory": ".output"
}

0 comments on commit af55faa

Please sign in to comment.