From cc22f33efeaeef6e0497f4c5e9c25e2986f808fa Mon Sep 17 00:00:00 2001 From: Josh Ashton <55456786+quaxlyqueen@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:27:35 -0700 Subject: [PATCH 1/5] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 37b390e3..6917a254 100644 --- a/README.md +++ b/README.md @@ -83,14 +83,14 @@ serve -s - [x] Template HTML blocks for repeated components. (v.0.0.1) - [x] Contact page. (v.0.0.1) - [x] Proper 404 page (v.0.0.1) -- [ ] Resume page (HTML and PDF options). (v.0.0.1) - - [ ] Make resume 1 page (v.0.0.1) -- [ ] Security: - - [ ] Separate user for self-hosting, with reduced permissions. (v.0.0.1) - - [ ] Dockerize (v.0.0.1) +- [x] Resume page (HTML and PDF options). (v.0.0.1) + - [x] Make resume 1 page (v.0.0.1)

Future Features:

+- [ ] Security: + - [ ] Separate user for self-hosting, with reduced permissions. (v.0.0.2) + - [ ] Dockerize (v.0.0.2) - [ ] Rewrite CSS into components/modules (v.0.0.2) - [ ] Read in data for portfolio a plain text files. (v.0.0.2) - [ ] Script to easily add new projects. (v.0.0.2) From b04570bcba5a2507a0a8abff550c87b9dff0fab6 Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Thu, 16 Jan 2025 00:08:28 +0000 Subject: [PATCH 2/5] converted to environment variables and changed and deleted API key. --- .gitignore | 2 ++ package-lock.json | 13 +++++++++++++ package.json | 4 +++- src/server.js | 8 +++++--- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a547bf36..2bd18039 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.env + # Logs logs *.log diff --git a/package-lock.json b/package-lock.json index aa339b14..25a88990 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "cors": "^2.8.5", + "dotenv": "^16.4.7", "express": "^4.21.2", "postmark": "^4.0.5", "react": "^18.2.0", @@ -1192,6 +1193,18 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", diff --git a/package.json b/package.json index e108ef8f..99c7dfff 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "cors": "^2.8.5", + "dotenv": "^16.4.7", "express": "^4.21.2", "postmark": "^4.0.5", "react": "^18.2.0", @@ -24,5 +25,6 @@ "build": "vite build", "dev": "vite --host", "start": "vite --host" - } + }, + "type": "module" } diff --git a/src/server.js b/src/server.js index c0c7ba71..4633d592 100644 --- a/src/server.js +++ b/src/server.js @@ -1,11 +1,13 @@ import express from "express"; import cors from "cors"; import postmark from "postmark"; +import * as dotenv from 'dotenv'; +dotenv.config(); + const app = express(); const port = 3001; // Example port -const client = new postmark.ServerClient( - "d15a4575-17f1-4ead-8e53-69eb2faea982", -); +const apiKey = process.env.API_KEY; +const client = new postmark.ServerClient(apiKey); app.use(cors()); app.use(express.json()); // Parse incoming JSON data From d64ffb6ffd2c1e26851df5a502d098187722e41c Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Fri, 17 Jan 2025 01:04:57 +0000 Subject: [PATCH 3/5] fixed bug on mobile where skill cards are laid horizontally instead of vertically. --- src/Home.jsx | 2 +- src/main.css | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Home.jsx b/src/Home.jsx index 1b39ed65..c5cea31f 100644 --- a/src/Home.jsx +++ b/src/Home.jsx @@ -32,7 +32,7 @@ const Home = ({ image, skills }) => {
-
+
Date: Thu, 23 Jan 2025 15:09:47 -0700 Subject: [PATCH 4/5] CI/CD setup --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..dbe9dbdf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: Deploy Portfolio + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + deploy: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + + # Saves the private key and adds your server to the list of known hosts + - name: SSH Setup + run: | + mkdir -p ~/.ssh/ + echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + sudo chmod 600 ~/.ssh/id_rsa + echo "$SSH_HOST_THUMBPRINT" > ~/.ssh/known_hosts + shell: bash + env: + SSH_PRIVATE_KEY: ${{secrets.DBP_LOGIN_KEY}} + SSH_HOST_THUMBPRINT: ${{secrets.DBP_THUMBPRINT}} + + # Connects to your server via ssh and runs the deploy bash script + - name: Run Deploy Script + run: ssh -i ~/.ssh/id_rsa prod@${{secrets.IP_ADDRESS}} sh portfolio-deploy.sh From 01af8385ee399b4cad7923ae00503d03452dbf61 Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Thu, 23 Jan 2025 22:12:52 +0000 Subject: [PATCH 5/5] updating .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2bd18039..04d53208 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .env +log.txt # Logs logs