Firestore backup and hosting rewrites

This commit is contained in:
Mentor Palokaj 2021-10-18 11:43:46 +02:00
parent 874360bdf1
commit deb8f8552f
3 changed files with 26 additions and 2 deletions

View File

@ -34,6 +34,20 @@ jobs:
- name: Install functions dependencies
run: npm i
working-directory: functions
# Backup firestore before deploying to database
- name: 'Set up gcloud cli'
uses: google-github-actions/setup-gcloud@master
with:
service_account_key: "${{ secrets.GCP_SERVICE_ACCOUT_JSON_PRODUCTION }}"
export_default_credentials: true
- name: Backup firestore
run: |
gcloud config set project ${{ secrets.FIREBASE_PROJECT_ID_PRODUCTION }}
echo "Project is now set to ${{ secrets.FIREBASE_PROJECT_ID_PRODUCTION }}"
gcloud firestore export ${{ secrets.GCP_BUCKET_LINK_PRODUCTION }}/firestore-backups/$(date +'%Y-%m-%d-%s')/
- name: Deploy to Firebase
uses: w9jds/firebase-action@master

View File

@ -11,7 +11,17 @@
"hosting": [
{
"target": "website",
"public": "website/docs"
"public": "website/docs",
"rewrites": [
{
"source": "/api",
"function": "mainnetMetadata"
},
{
"source": "/testnetapi",
"function": "testnetMetadata"
}
]
},
{
"target": "minter",

View File

@ -96,7 +96,7 @@ main
padding: 1rem
text-align: center
h2
font-family: monospace, serif
font-family: "Courier New", monospace, serif
line-height: 2rem
#story