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

@ -35,6 +35,20 @@ jobs:
run: npm i run: npm i
working-directory: functions 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 - name: Deploy to Firebase
uses: w9jds/firebase-action@master uses: w9jds/firebase-action@master
with: with:

View File

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

View File

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