Skip to content

Commit

Permalink
added firebase config
Browse files Browse the repository at this point in the history
  • Loading branch information
bananashell committed Oct 31, 2021
1 parent 2784ba5 commit 29f575f
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "vardagsmaten-87525"
}
}
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.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 merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn ci && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VARDAGSMATEN_87525 }}'
channelId: live
projectId: vardagsmaten-87525
17 changes: 17 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn ci && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_VARDAGSMATEN_87525 }}'
projectId: vardagsmaten-87525
10 changes: 10 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"hosting": {
"public": "out",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
7 changes: 5 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
}
reactStrictMode: true,
images: {
loader: "custom",
},
};
3 changes: 3 additions & 0 deletions src/components/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { FunctionComponent } from "react";
import styled from "styled-components";
import GithubImg from "public/GitHub-Mark-32px.png";
import LinkedInImg from "public/LI-In-Bug.png";
import { imageLoader } from "util/imageLoader";

export const Info: FunctionComponent = () => {
return (
Expand All @@ -19,6 +20,7 @@ export const Info: FunctionComponent = () => {
src={GithubImg}
layout="responsive"
objectFit="contain"
loader={imageLoader}
/>
</a>
</Link>
Expand All @@ -34,6 +36,7 @@ export const Info: FunctionComponent = () => {
src={LinkedInImg}
layout="responsive"
objectFit="contain"
loader={imageLoader}
/>
</a>
</Link>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Recipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Links } from "./Links";
import { TagList } from "./TagList";
import ReloadIcon from "public/reload-svgrepo-com.svg";
import Image from "next/image";
import { imageLoader } from "util/imageLoader";

type Props = {
weekday: typeof weekdays[number];
Expand Down Expand Up @@ -44,6 +45,7 @@ export const Recipe: FunctionComponent<Props> = ({
width={30}
height={30}
objectFit={"fill"}
loader={imageLoader}
/>
</RandomizeButton>
</DayOfTheWeekContainer>
Expand Down
2 changes: 0 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { NextPage } from "next";
import Head from "next/head";
import Image from "next/image";
import { RecipeList } from "../components/RecipeList";

const Home: NextPage = () => {
Expand Down
5 changes: 5 additions & 0 deletions src/util/imageLoader.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { ImageLoader } from "next/image";

export const imageLoader: ImageLoader = ({ src }) => {
return src;
};

0 comments on commit 29f575f

Please sign in to comment.