diff --git a/package.json b/package.json index ded9255..db5c6e5 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/public/sitemap-0.xml b/public/sitemap-0.xml index c08d8cd..04945be 100644 --- a/public/sitemap-0.xml +++ b/public/sitemap-0.xml @@ -1,15 +1,15 @@ -https://www.aaronjy.me/2024-03-22T13:35:02.655Zdaily0.7 -https://www.aaronjy.me/cv/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/fun/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/recipes/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/writing/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/recipes/arayes/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/recipes/manakish/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/recipes/red-lentil-soup/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/recipes/spicy-sausage-pasta/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/writing/static-site-on-google-cloud/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/writing/support-content-filte-structure-changes-on-a-static-site/2024-03-22T13:35:02.656Zdaily0.7 -https://www.aaronjy.me/fun/javascript-html5-tile-editor/2024-03-22T13:35:02.656Zdaily0.7 +https://www.aaronjy.me/2024-03-22T17:26:58.661Zdaily0.7 +https://www.aaronjy.me/cv/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/fun/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/recipes/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/writing/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/recipes/arayes/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/recipes/manakish/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/recipes/red-lentil-soup/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/recipes/spicy-sausage-pasta/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/fun/javascript-html5-tile-editor/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/writing/static-site-on-google-cloud/2024-03-22T17:26:58.662Zdaily0.7 +https://www.aaronjy.me/writing/support-content-filte-structure-changes-on-a-static-site/2024-03-22T17:26:58.662Zdaily0.7 \ No newline at end of file diff --git a/src/components/CV/CV.jsx b/src/components/CV/CV.jsx index aedaafb..de279fa 100644 --- a/src/components/CV/CV.jsx +++ b/src/components/CV/CV.jsx @@ -1,6 +1,6 @@ import React from 'react' -import style from './CV.module.css' +import style from './Cv.module.css' function Cv ({ competencies, diff --git a/src/components/CV/Cv.css b/src/components/CV/Cv.module.css similarity index 100% rename from src/components/CV/Cv.css rename to src/components/CV/Cv.module.css diff --git a/src/components/Header/Header.test.jsx b/src/components/Header/Header.test.jsx index 963d82f..2bb6443 100644 --- a/src/components/Header/Header.test.jsx +++ b/src/components/Header/Header.test.jsx @@ -11,7 +11,7 @@ describe('Header', () => { it('renders correct navigation links', () => { render(
) - const links = ['Home', 'Writing', 'Recipes', 'Fun', 'CV'] + const links = ['Home', 'Writing', 'Recipess', 'Fun', 'CV'] links.forEach(link => { expect(screen.getByText(link)).toBeInTheDocument() }) diff --git a/src/pages/index.js b/src/pages/index.js index 24e5bca..0d4b9c0 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -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 ( diff --git a/util/deploy-gcloud.sh b/util/deploy-gcloud.sh index 80821c2..caba1e3 100755 --- a/util/deploy-gcloud.sh +++ b/util/deploy-gcloud.sh @@ -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" diff --git a/util/pre-deploy.sh b/util/pre-deploy.sh new file mode 100755 index 0000000..96fb844 --- /dev/null +++ b/util/pre-deploy.sh @@ -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." \ No newline at end of file