mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
Firestore backup and hosting rewrites
This commit is contained in:
parent
874360bdf1
commit
deb8f8552f
14
.github/workflows/deploy-functions.yml
vendored
14
.github/workflows/deploy-functions.yml
vendored
@ -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:
|
||||||
|
@ -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",
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user