From 2a0ffcd249a77b37a6c2a82d7af0151471cfd3c1 Mon Sep 17 00:00:00 2001
From: Chris Moriarty
Date: Thu, 7 Nov 2024 18:09:41 -0500
Subject: [PATCH] Added github action to deploy site to pages
---
.github/workflows/deploy.yml | 39 ++++++++++++++++++++++++++++++++++++
astro.config.mjs | 6 ++++--
src/pages/index.astro | 6 +-----
3 files changed, 44 insertions(+), 7 deletions(-)
create mode 100644 .github/workflows/deploy.yml
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..d1130f1
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,39 @@
+name: Deploy to GitHub Pages
+
+on:
+ # Trigger the workflow every time you push to the `main` branch
+ # Using a different branch name? Replace `main` with your branch’s name
+ push:
+ branches: [main]
+ # Allows you to run this workflow manually from the Actions tab on GitHub.
+ workflow_dispatch:
+
+# Allow this job to clone the repo and create a page deployment
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout your repository using git
+ uses: actions/checkout@v4
+ - name: Install, build, and upload your site
+ uses: withastro/action@v3
+ with:
+ path: . # The root location of your Astro project inside the repository. (optional)
+ node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional)
+ package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/astro.config.mjs b/astro.config.mjs
index 09cfd9b..5649196 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -5,5 +5,7 @@ import react from "@astrojs/react";
// https://astro.build/config
export default defineConfig({
- integrations: [tailwind(), react()]
-});
\ No newline at end of file
+ site: "https://ChrisMoriarty.github.io",
+ // base: "/moriartyengineering",
+ integrations: [tailwind(), react()],
+});
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 1e520be..7a040ff 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -94,11 +94,7 @@ import Layout from "../layouts/Layout.astro";
, to pursue my own endevours. I'm passionate about
science, technology, and the intersection of the two. I'm
always looking for new and exciting opportunities to
- collaborate with others.
-
-
-
- Looking forward to new challenges and exciting collaborations!
+ collaborate with others!