forked from theHandsomestNerd/mixed-feelings-by-t
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9766f63
commit 847f7a2
Showing
23 changed files
with
619 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Backup Sanity db | ||
on: | ||
schedule: | ||
# Runs at 04:00 UTC on the 1st and 17th of every month | ||
- cron: '0 4 */16 * *' | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
export_upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Install dependencies | ||
run: | | ||
cd sanityIo | ||
npm install | ||
set -e | ||
# Put your environment variables here. Don't forget | ||
# to create secrets for them on GitHub: | ||
# https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets | ||
cat << EOF > .env.production | ||
EOF | ||
# Make sure to add a secret for SANITY_AUTH_TOKEN | ||
SANITY_AUTH_TOKEN="${{ secrets.SANITY_AUTH_TOKEN }}" npx @sanity/cli dataset export production backups/backup.tar.gz | ||
- name: Upload backup.tar.gz | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: backup-tarball | ||
path: sanityIo/backups/backup.tar.gz | ||
# Fails the workflow if no files are found; defaults to 'warn' | ||
if-no-files-found: error |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
const MENUGROUP = ` | ||
title, | ||
_type, | ||
slug, | ||
menuGroupTitle, | ||
"links":links[]->{ | ||
_type, | ||
displayText, | ||
url, | ||
isOutlinedButton, | ||
isContainedButton, | ||
isModalButton, | ||
modalRef->{ | ||
name, | ||
title, | ||
slug, | ||
backgroundImageSrc, | ||
iconOverlayImageSrc, | ||
"contentText":contentText[], | ||
"notes":notes[], | ||
ctaButtonTitle, | ||
ctaButtonLink | ||
} | ||
}, | ||
displayText, | ||
url, | ||
isOutlinedButton, | ||
isContainedButton, | ||
`; | ||
|
||
const MENUGROUPCONTAINER = ` | ||
title, | ||
slug, | ||
displayText, | ||
"subMenus":subMenus[]->{ | ||
${MENUGROUP} | ||
}, | ||
logoImageSrc, | ||
logoImageAltText | ||
`; | ||
|
||
const SERVICE = | ||
`name, | ||
imageSrc, | ||
imageSrcAltText, | ||
contentTitle, | ||
contentText, | ||
ctaButtonText, | ||
ctaButtonLink, | ||
learnMoreLink, | ||
learnMoreText, | ||
educationPageTitle, | ||
educationPageSlimHeroImage, | ||
extendedDescriptions, | ||
benefitsOfServiceTitle, | ||
benefitsOfServiceContents, | ||
benefitsOfServiceBullets, | ||
"serviceAmenities": serviceAmenities[]->, | ||
slug,`; | ||
|
||
|
||
const HOMEPAGE = `_type, | ||
title, | ||
isUnderConstruction, | ||
releaseDate, | ||
slug, | ||
address, | ||
email, | ||
phone, | ||
description, | ||
businessCardImageSrc, | ||
bookAppointmentLink, | ||
bookAppointmentQrCode, | ||
website, | ||
websiteQrCode, | ||
metaImage, | ||
headerContent { | ||
"content": content[]->{ | ||
..., | ||
headerMenuRef->{ | ||
${MENUGROUPCONTAINER} | ||
}, | ||
} | ||
}, | ||
footerContent { | ||
"content": content[]->{ | ||
..., | ||
footerMenuRef->{ | ||
${MENUGROUPCONTAINER} | ||
}, | ||
} | ||
}, | ||
pageContent { | ||
"content": content[]->{ | ||
..., | ||
"servicesList": servicesList[]->{ | ||
${SERVICE} | ||
}, | ||
"serviceAmenities": serviceAmenities[]->, | ||
"skillsets": skillsets[]{ | ||
..., | ||
"skills": skills[]->{ | ||
_id, | ||
name, | ||
title, | ||
}, | ||
}, | ||
"experiences": experiences[]->{ | ||
..., | ||
"skillsUsed": skillsUsed[]-> | ||
}, | ||
"educationExperiences": educationExperiences[]->, | ||
"feedbackEntries": feedbackEntries[]->, | ||
"portfolioEntries": portfolioEntries[]->{ | ||
..., | ||
"skillsHighlighted": skillsHighlighted[]->, | ||
"imageGallery": imageGallery[] | ||
}, | ||
"resumeFile": resumeFile.asset->, | ||
"cvFile": cvFile.asset-> | ||
} | ||
}, | ||
"servicesAvailable": servicesAvailable[]->{ | ||
${SERVICE} | ||
}, | ||
underConstructionPageRef, | ||
structuredData, | ||
facebook, | ||
facebookIconSrc{ | ||
asset->{ | ||
_id, | ||
url, | ||
altText | ||
} | ||
}, | ||
twitter, | ||
twitterIconSrc{ | ||
asset->{ | ||
_id, | ||
url, | ||
altText | ||
} | ||
}, | ||
instagram, | ||
linkedIn, | ||
github, | ||
instagramIconSrc{ | ||
asset->{ | ||
_id, | ||
url, | ||
altText | ||
} | ||
} | ||
`; | ||
// const MENUGROUP = ` | ||
// title, | ||
// slug, | ||
// logoImage, | ||
// menuGroupTitle, | ||
// "links": links[]->{title, displayText, url, isOutlinedButton, isContainedButton} | ||
// ` | ||
|
||
|
||
enum SANITY_TYPES_ENUM { | ||
SERVICE="transformServiceItem" | ||
} | ||
|
||
const defaultObj = {HOMEPAGE, MENUGROUPCONTAINER, MENUGROUP, SERVICE, SANITY_TYPES_ENUM}; | ||
|
||
|
||
export default defaultObj; |
Oops, something went wrong.