feat: add pre-build script

This commit is contained in:
Aaron Yarborough 2024-03-22 17:29:10 +00:00
parent c2a308b36b
commit 729c698959
8 changed files with 34 additions and 16 deletions

View file

@ -12,7 +12,7 @@
"link": "npx standard",
"format": "npx standard --fix",
"prepare": "husky",
"deploy": "./util/deploy-gcloud.sh",
"deploy": "./util/pre-deploy.sh && ./util/deploy-gcloud.sh",
"test": "jest --verbose"
},
"dependencies": {

View file

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://www.aaronjy.me/</loc><lastmod>2024-03-22T13:35:02.655Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/cv/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/fun/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/writing/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/arayes/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/manakish/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/red-lentil-soup/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/spicy-sausage-pasta/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/writing/static-site-on-google-cloud/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/writing/support-content-filte-structure-changes-on-a-static-site/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/fun/javascript-html5-tile-editor/</loc><lastmod>2024-03-22T13:35:02.656Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/</loc><lastmod>2024-03-22T17:26:58.661Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/cv/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/fun/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/writing/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/arayes/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/manakish/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/red-lentil-soup/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/recipes/spicy-sausage-pasta/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/fun/javascript-html5-tile-editor/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/writing/static-site-on-google-cloud/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.aaronjy.me/writing/support-content-filte-structure-changes-on-a-static-site/</loc><lastmod>2024-03-22T17:26:58.662Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>

View file

@ -1,6 +1,6 @@
import React from 'react'
import style from './CV.module.css'
import style from './Cv.module.css'
function Cv ({
competencies,

View file

@ -11,7 +11,7 @@ describe('Header', () => {
it('renders correct navigation links', () => {
render(<Header />)
const links = ['Home', 'Writing', 'Recipes', 'Fun', 'CV']
const links = ['Home', 'Writing', 'Recipess', 'Fun', 'CV']
links.forEach(link => {
expect(screen.getByText(link)).toBeInTheDocument()
})

View file

@ -1,6 +1,6 @@
import Head from 'next/head'
import ExternalLink from '@/components/ExternalLink'
import DefaultLayout from '@/layouts/DefaultLayout/DefaultLayout'
import ExternalLink from '@/components/ExternalLink/ExternalLink'
export default function Home () {
return (

View file

@ -1,3 +1,6 @@
#!/bin/bash
set -e # Exit with nonzero exit code if anything fails
BUCKET_URL="gs://aaronjy-www"
BACKUP_BUCKET_URL="gs://aaronjy-www-backup"

15
util/pre-deploy.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
set -e # Exit with nonzero exit code if anything fails
echo "Preparing for deployment..."
echo "Building site..."
npm run build
echo "Commit any build artifacts..."
git add . && git commit -m "chore: build artifacts"
ech "Running tests..."
npx jest
echo "Finished preparing for deployment."