Skip to content

Commit

Permalink
chore: configure env
Browse files Browse the repository at this point in the history
  • Loading branch information
santosfrancisco committed Jan 9, 2024
1 parent 3b8ac3b commit 3ebf986
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 32 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ jobs:
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
env:
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
NEXT_PUBLIC_FIREBASE_DATABASE_URL: ${{ secrets.NEXT_PUBLIC_FIREBASE_DATABASE_URL }}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}
FIREBASE_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }}
FIREBASE_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }}
NEXT_PUBLIC_BASE_PATH: ${{ secrets.NEXT_PUBLIC_BASE_PATH }}
- name: Static HTML export with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next export
- name: Upload artifact
Expand Down
32 changes: 32 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// @ts-check

/**
* @type {import('next').NextConfig}
**/
const nextConfig = {
/**
* Enable static exports for the App Router.
*
* @see https://nextjs.org/docs/pages/building-your-application/deploying/static-exports
*/
output: "export",

/**
* Set base path. This is usually the slug of your repository.
*
* @see https://nextjs.org/docs/app/api-reference/next-config-js/basePath
*/
basePath: process.env.NEXT_PUBLIC_BASE_PATH,

/**
* Disable server-based image optimization. Next.js does not support
* dynamic features with static exports.
*
* @see https://nextjs.org/docs/pages/api-reference/components/image#unoptimized
*/
images: {
unoptimized: true,
},
};

module.exports = nextConfig;
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function Home() {
</p>
<a href={database?.latest?.link} download>
<img
src="/img/manga-xpress-logo.png"
src={`${process.env.NEXT_PUBLIC_BASE_PATH}/img/manga-xpress-logo.png`}
alt="Logo Mangá Xpress"
width={240}
/>
Expand Down
31 changes: 0 additions & 31 deletions pages/profile/[username].js

This file was deleted.

0 comments on commit 3ebf986

Please sign in to comment.