Skip to content

Commit b1bb90b

Browse files
firebase hosting deploy
1 parent 500314a commit b1bb90b

9 files changed

Lines changed: 88 additions & 22 deletions

File tree

.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "purple-turtle-creative"
4+
}
5+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on merge
5+
on:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- run: npm ci
15+
- uses: FirebaseExtended/action-hosting-deploy@v0
16+
with:
17+
repoToken: ${{ secrets.GITHUB_TOKEN }}
18+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PURPLE_TURTLE_CREATIVE }}
19+
channelId: live
20+
projectId: purple-turtle-creative
21+
env:
22+
FIREBASE_CLI_EXPERIMENTS: webframeworks
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This file was auto-generated by the Firebase CLI
2+
# https://github.com/firebase/firebase-tools
3+
4+
name: Deploy to Firebase Hosting on PR
5+
on: pull_request
6+
permissions:
7+
checks: write
8+
contents: read
9+
pull-requests: write
10+
jobs:
11+
build_and_preview:
12+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- run: npm ci
17+
- uses: FirebaseExtended/action-hosting-deploy@v0
18+
with:
19+
repoToken: ${{ secrets.GITHUB_TOKEN }}
20+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_PURPLE_TURTLE_CREATIVE }}
21+
projectId: purple-turtle-creative
22+
env:
23+
FIREBASE_CLI_EXPERIMENTS: webframeworks

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
# production
2121
/build
22+
/out
23+
/.firebase
2224

2325
# misc
2426
.DS_Store

components/Layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ const Layout = ({ children, title = "This is the default title" }: Props) => (
1717
<header>
1818
<nav>
1919
<Link href="/">Home</Link> | <Link href="/about">About</Link> |{" "}
20-
<Link href="/users">Users List</Link> |{" "}
21-
<a href="/api/users">Users API</a>
20+
<Link href="/users">Users List</Link>
2221
</nav>
2322
</header>
2423
{children}

firebase.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"hosting": {
3+
"source": ".",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
],
9+
"frameworksBackend": {
10+
"region": "us-east1"
11+
}
12+
}
13+
}

next.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
output: 'export', // Static export.
5+
};
6+
7+
export default nextConfig;

pages/api/users/index.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

tsconfig.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": false,
@@ -12,8 +16,15 @@
1216
"moduleResolution": "node",
1317
"resolveJsonModule": true,
1418
"isolatedModules": true,
15-
"jsx": "preserve"
19+
"jsx": "preserve",
20+
"incremental": true
1621
},
17-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
18-
"exclude": ["node_modules"]
22+
"include": [
23+
"next-env.d.ts",
24+
"**/*.ts",
25+
"**/*.tsx"
26+
],
27+
"exclude": [
28+
"node_modules"
29+
]
1930
}

0 commit comments

Comments
 (0)