From 4d6e8b6b34a34d448cc13c945fd33951db077fa2 Mon Sep 17 00:00:00 2001 From: peterpeterparker Date: Fri, 29 Nov 2019 14:22:08 +0100 Subject: [PATCH] feat: add Firebase configuration to GitHub and fix docs CI artifact path --- .github/workflows/docs.yml | 2 +- .gitignore | 2 -- cloud/.firebaserc | 6 ++++++ cloud/firebase.json | 8 ++++++++ docs/.firebaserc | 5 +++++ docs/firebase.json | 29 +++++++++++++++++++++++++++++ remote/.firebaserc | 6 ++++++ remote/firebase.json | 29 +++++++++++++++++++++++++++++ studio/.firebaserc | 6 ++++++ studio/firebase.json | 38 ++++++++++++++++++++++++++++++++++++++ 10 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 cloud/.firebaserc create mode 100644 cloud/firebase.json create mode 100644 docs/.firebaserc create mode 100644 docs/firebase.json create mode 100644 remote/.firebaserc create mode 100644 remote/firebase.json create mode 100644 studio/.firebaserc create mode 100644 studio/firebase.json diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1ace80867..8e086c012 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: uses: actions/upload-artifact@master with: name: docs - path: docs + path: docs/dist deploy: name: Deploy needs: build diff --git a/.gitignore b/.gitignore index 7164077bb..0ce0f07b4 100644 --- a/.gitignore +++ b/.gitignore @@ -29,8 +29,6 @@ UserInterfaceState.xcuserstate lib/ .firebase/ -firebase.json -.firebaserc .terraform diff --git a/cloud/.firebaserc b/cloud/.firebaserc new file mode 100644 index 000000000..e0b99d25f --- /dev/null +++ b/cloud/.firebaserc @@ -0,0 +1,6 @@ +{ + "projects": { + "default": "deckdeckgo-studio-prod", + "staging": "deckdeckgo-studio-beta" + } +} diff --git a/cloud/firebase.json b/cloud/firebase.json new file mode 100644 index 000000000..67a150108 --- /dev/null +++ b/cloud/firebase.json @@ -0,0 +1,8 @@ +{ + "functions": { + "predeploy": [ + "npm --prefix \"$RESOURCE_DIR\" run lint", + "npm --prefix \"$RESOURCE_DIR\" run build" + ] + } +} diff --git a/docs/.firebaserc b/docs/.firebaserc new file mode 100644 index 000000000..ce213cbec --- /dev/null +++ b/docs/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "deckdeckgo-docs" + } +} diff --git a/docs/firebase.json b/docs/firebase.json new file mode 100644 index 000000000..69749defc --- /dev/null +++ b/docs/firebase.json @@ -0,0 +1,29 @@ +{ + "hosting": { + "public": "www", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ], + "headers": [{ + "source" : "sw.js", + "headers" : [{ + "key" : "Cache-Control", + "value" : "public,max-age=0,must-revalidate" + }] + },{ + "source" : "/", + "headers" : [{ + "key" : "Cache-Control", + "value" : "public,max-age=0,must-revalidate" + }] + }] + } +} diff --git a/remote/.firebaserc b/remote/.firebaserc new file mode 100644 index 000000000..f91a9e150 --- /dev/null +++ b/remote/.firebaserc @@ -0,0 +1,6 @@ +{ + "projects": { + "default": "deckdeckgo-app", + "staging": "deckdeckgo-app-beta" + } +} \ No newline at end of file diff --git a/remote/firebase.json b/remote/firebase.json new file mode 100644 index 000000000..69749defc --- /dev/null +++ b/remote/firebase.json @@ -0,0 +1,29 @@ +{ + "hosting": { + "public": "www", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ], + "headers": [{ + "source" : "sw.js", + "headers" : [{ + "key" : "Cache-Control", + "value" : "public,max-age=0,must-revalidate" + }] + },{ + "source" : "/", + "headers" : [{ + "key" : "Cache-Control", + "value" : "public,max-age=0,must-revalidate" + }] + }] + } +} diff --git a/studio/.firebaserc b/studio/.firebaserc new file mode 100644 index 000000000..e0b99d25f --- /dev/null +++ b/studio/.firebaserc @@ -0,0 +1,6 @@ +{ + "projects": { + "default": "deckdeckgo-studio-prod", + "staging": "deckdeckgo-studio-beta" + } +} diff --git a/studio/firebase.json b/studio/firebase.json new file mode 100644 index 000000000..7f5fbc054 --- /dev/null +++ b/studio/firebase.json @@ -0,0 +1,38 @@ +{ + "hosting": { + "public": "www", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ], + "headers": [{ + "source" : "sw.js", + "headers" : [{ + "key" : "Cache-Control", + "value" : "public,max-age=0,must-revalidate" + }] + },{ + "source" : "/", + "headers" : [{ + "key" : "Cache-Control", + "value" : "public,max-age=0,must-revalidate" + }] + }, + { + "source": "assets/icons/**/*", + "headers": [ + { + "key": "Access-Control-Allow-Origin", + "value": "*" + } + ] + }] + } +}