Skip to content

Commit

Permalink
Merge pull request #309 from dgrebb/develop
Browse files Browse the repository at this point in the history
Release 2.2.0
  • Loading branch information
dgrebb authored Jun 25, 2023
2 parents 484413e + da35a9c commit ceb9f2e
Show file tree
Hide file tree
Showing 59 changed files with 1,657 additions and 615 deletions.
2 changes: 1 addition & 1 deletion .cz.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"commitizen": {
"name": "cz_conventional_commits",
"version": "2.1.1",
"version": "2.2.0",
"tag_format": "$major.$minor.$patch$prerelease",
"version_type": "semver",
"bump_message": "release $current_version \u2192 $new_version"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy-back.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
# uses: actions/checkout@v3
# with:
# repository: dgrebb/dgrebb.com
# ref: ${{ secrets.DEPLOYMENT_BRANCH }}
# ref: ${{ github.ref }}
# token: ${{ github.token }}
43 changes: 10 additions & 33 deletions .github/workflows/build-deploy-front.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,26 @@
name: Build & Deploy Frontend

on:
workflow_dispatch:
repository_dispatch:
types:
- Frontend
- Strapi
workflow_dispatch

jobs:
front:
name: Frontend
runs-on: ubuntu-latest

environment:
name: ${{ github.ref == 'refs/heads/main' && 'prd' || 'stg' }}
name: ${{ github.ref_name == 'main' && 'prd' || 'stg' }}

steps:

- name: Add Masks
run: |
echo "::add-mask::${{ github.token }}"
echo "::add-mask::${{ secrets.PUBLIC_API_PATH_NAVIGATION }}"
echo "::add-mask::${{ secrets.PUBLIC_API_URL }}"
echo "::add-mask::${{ secrets.PUBLIC_API_PATH_HOME }}"
echo "::add-mask::${{ secrets.PUBLIC_API_PATH_FOOTER }}"
echo "::add-mask::${{ secrets.API_KEY }}"
echo "::add-mask::${{ secrets.PUBLIC_SENTRY_DSN }}"
echo "::add-mask::${{ secrets.PUBLIC_ENV }}"
echo "::add-mask::${{ secrets.AWS_ACCESS_KEY_ID }}"
echo "::add-mask::${{ secrets.AWS_SECRET_ACCESS_KEY }}"
echo "::add-mask::${{ secrets.AWS_REGION }}"
echo "::add-mask::${{ secrets.AWS_S3_BUCKET }}"
- name: Checkout
uses: actions/checkout@v3
with:
repository: dgrebb/dgrebb.com
ref: ${{ secrets.DEPLOYMENT_BRANCH }}
ref: ${{ github.ref }}
token: ${{ github.token }}
fetch-depth: 0

- name: Extract Branch Name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: "18.x"

- name: Set .env
run: |
touch front/.env
Expand All @@ -58,19 +29,25 @@ jobs:
echo PUBLIC_API_PATH_NAVIGATION='${{ secrets.PUBLIC_API_PATH_NAVIGATION }}' >> front/.env
echo PUBLIC_API_PATH_HOME='${{ secrets.PUBLIC_API_PATH_HOME }}' >> front/.env
echo PUBLIC_API_PATH_FOOTER='${{ secrets.PUBLIC_API_PATH_FOOTER }}' >> front/.env
echo PUBLIC_API_PATH_PRIVACY='${{ secrets.PUBLIC_API_PATH_PRIVACY }}' >> front/.env
echo API_KEY=${{ secrets.API_KEY }} >> front/.env
echo PUBLIC_SENTRY_DSN=${{ secrets.PUBLIC_SENTRY_DSN }} >> front/.env
echo PUBLIC_ENV=${{ secrets.PUBLIC_ENV }} >> front/.env
cat front/.env
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: "18.x"

- name: Build
id: npm-build
env:
GH_TOKEN: ${{ github.token }}
run: bash _ci/build.sh

- name: Robots
if: ${{ steps.extract_branch.outputs.branch }} == 'main'
if: ${{ github.ref_name == 'main' }}
run: |
sed -i 's/^Disallow\: \/$/Allow\: \//' front/build/robots.txt
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dispatch-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: dorny/paths-filter@v2
id: changes
with:
base: ${{ secrets.DEPLOYMENT_BRANCH }}
base: ${{ github.ref_name }}
filters: |
backend:
- 'back/**'
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Dispatch Frontend
run: |
curl -X POST https://api.github.com/repos/dgrebb/dgrebb.com/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
curl -X POST https://api.github.com/repos/dgrebb/dgrebb.com/actions/workflows/${{ secrets.FRONTEND_WORKFLOW_ID }}/dispatches \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${{ secrets.DISPATCH_TOKEN }}' \
--data '{"event_type": "Frontend"}'
--data '{"ref": "${{ github.ref_name }}"}'
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,96 @@

All notable changes to this project will be documented in this file.

## [2.2.0] - 2023-06-24

### 💡 Features

- ***(front)*** Adds italic to h6 and sets text-base for h5/6
- ***(front)*** Adds scrollbar behavior and style enhancements
- ***(front)*** Adds more mobile-first style enhancements
- ***(front)*** Adjustments to font-size, margin, and padding
- ***(front)*** Adjusts Code component scrollbar
- ***(front)*** Refactor file structure and import paths
- ***(front)*** Refactors ThemeToggle component
- ***(front)*** Adds global mobile styles
- ***(front)*** Adds mobile styles for and refactors Code component
- ***(front)*** Adds mobile styles for posts/privacy
- ***(front)*** Adds mobile styles for and refactors Image component
- ***(front)*** Updates flourish component styles
- ***(front)*** Moves body classes and adds mobile text size
- ***(front)*** Uses privacy updatedAt time for effective date
- ***(front)*** Moves and adjusts styles for code in posts
- ***(front)*** Adds syntax highlighter styles and loads based on theme
- ***(front)*** Adds Code component as a markdown renderer
- ***(front)*** Adds event listener to system color and toggles theme
- ***(front)*** Installs svelte-highlight
- ***(front)*** Refactors tailwind classes with @apply in css
- ***(front)*** Adds Flourish component and sets z-index for media elements
- ***(front)*** Deletes user.ip from Sentry log events
- ***(front)*** Adds privacy route, new (and updated) styles
- ***(strapi)*** Updates strapi to v4.11.2
- ***(strapi)*** Installs and configures sentry for strapi
- ***(strapi)*** Adds privacy singleton and api
- ***(utils)*** Adds supporting sentry env vars to backend

### 🐛 Bug Fixes

- ***(front)*** Removes unused ThemeToggle vars in Header
- ***(front)*** Fixes @apply class error when importing css directly
- ***(front)*** Removes crypto and uuid from client logging
- ***(front)*** Fixes Link component for anchor, mailto, and tel variants
- ***(front)*** Fixes closing Sentry.init() bracket
- ***(front)*** Refactor beforeSend scrub conditionals
- ***(front)*** Uses theme colors for pre tag on privacy page
- ***(front)*** Refactors for and uses noscript styles
- ***(front)*** Installs, uses, and refactors for unplugin-icons and inanimate svgs
- ***(front)*** Adds error message to layout server

### 📜 Documentation

- ***(project)*** Updates privacy policy
- ***(project)*** Updates privacy policy
- ***(project)*** Updates privacy policy
- ***(project)*** Adds PRIVACY.md

### 👷 Build

- ***(back)*** Reinstalls @strapi/plugin-seo after flexbox PR merged
- ***(front)*** Removes unused crypto import
- ***(front)*** Removes server_name from sentry events
- ***(front)*** Adds exception for intentional link to 404 page
- ***(front)*** Bumps sentry to latest version
- ***(utils)*** Adds expose host to svelte-kit preview
- ***(utils)*** Adds PUBLIC_API_PATH_PRIVACY env var to setup script

### 💚 Continuous Integration

- ***(front)*** Updates dispatch workflow to use workflow id/endpoint
- ***(front)*** Adds privacy api endpoint to workflow
- ***(project)*** Double quotes github var in payload
- ***(project)*** Move testing steps out of github workflow file
- ***(project)*** Adds and updates test configuration for workflow_dispatch
- ***(project)*** Removes echo
- ***(project)*** Uses github.ref_name for contitional and also logs the ref_name for testing
- ***(project)*** Uses github.ref as environment conditional
- ***(project)*** Removes colon
- ***(project)*** Removes event types from workflow_dispatch
- ***(project)*** Sets local environment to "development" in sentry logging
- ***(project)*** Removes repository_dispatch while testing
- ***(project)*** Removes unused steps and adjusts order
- ***(project)*** Uses DEPLOYMENT_BRANCH instead of github.ref in robots step
- ***(utils)*** Uses workflow_dispatch in act script

### 🪮 Styling

- ***(front)*** Removes extra line
- ***(front)*** Formats markdown component
- ***(front)*** Touches up css refactor
- ***(front)*** Changes linkedin svg
- ***(front)*** Moves font classes
- ***(front)*** Refactors styles for privacy policy; makes footer link brighter
- ***(front)*** Self-closes span

## [2.1.1] - 2023-06-19

### 🐛 Bug Fixes
Expand Down
68 changes: 68 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Welcome, dear visitor! We appreciate your presence here and would like to take a moment to acquaint you with our Privacy Policy. It's a document that sheds light on how we handle your personal information with utmost care when you use this website and its related services.

By accessing or using this website, you're happily agreeing to the terms laid out in this Privacy Policy. However, if you don't find these terms amusing or to your liking, we kindly request that you refrain from using this website or providing any personal information.

## Information We Collect

1. **Personal Information**: Rest assured, we don't collect personal details apart from browser and system information. We've gone to great lengths to remove any personally identifiable information from our Analytics and Error Logging tools (more on those below). This includes visitors' IP addresses and even the fancy-sounding `server_name`, which refers to your computer's network name.

1. **[Plausible Analytics](https://plausible.io)** is our trusty sidekick for keeping track of pageviews and counting visitors. You might enjoy checking out the company's [delightful post about privacy policies](https://plausible.io/blog/privacy-policy-page#privacy-policy-examples), which inspired most of this document. For more specific details about Plausible's privacy practices, please see the [Third-Party Services](#third-party-services) section below.

2. **[Sentry.io](https://www.sentry.io)** comes to our rescue when it comes to capturing errors on both the client (browser) and server (500s, 400s, and 300s). Sentry helps diagnose problems with this site by capturing browser and system information. It even allows us to "playback" user interactions on the site, which is quite handy for figuring out broken code or user experience blunders.

Now, here's the thing: Sentry, by default, logs IP addresses. But fear not! We scrub this data before it reaches the sentry.io services and servers. The JavaScript responsible for this scrubbing is cleverly hidden away from evident view on main dgrebb.com pages. However, you can spot it at the bottom of our static [404 page](/404). Go ahead, take a peek:

```javascript
beforeSend(event) {
if (event.user) {
delete event.user.ip;
}
if (event.server_name) {
delete event.server_name;
}
}
```

Despite our diligent data scrubbing efforts, please note that Sentry's servers will log the requesting IP address when a client (that's your browser) loads JavaScript from their servers. For more details about Sentry's privacy practices, please refer to the [Third-Party Services](#third-party-services) section.
2. **Usage Information**: We may also collect certain non-personally identifiable information ("Usage Information") automatically when you grace us with your presence at dgrebb.com. This includes your browser type, operating system, referring website, pages you visit, and the glorious timestamp of your visit.
## Use of Cookies
1. **No cookies here, and never will be!** If, by some freakish occurrence, you encounter a cookie on this site, please alert us immediately by sending an email to privacy [at] dgrebb.com. We shall take swift action!
## How We Use Your Information
1. **Personal Information**: Everything we collect remains anonymous and is anonymized before being sent to our dear friends, the third-party services like Plausible and Sentry. In simpler terms, we may know the type of browser and operating system you use to access dgrebb.com, but we're unable to trace those details back to a specific IP address, MAC address, email address, mailing address, or anything remotely identifying.

2. **Usage Information**: We merrily review Usage Information to analyze trends, administer the website, track users' movements, and gather anonymous geo-location information for aggregate use. This information helps us improve the website, monitor its performance, and enhance the overall user experience. We believe in giving our users an experience as smooth as freshly churned butter.
## Third-Party Services
1. **Plausible Analytics**: We rely on Plausible Analytics, a privacy-focused web analytics tool that collects and analyzes Usage Information. Plausible Analytics doesn't use cookies and doesn't collect any personally identifiable information. The information they gather is stored on their own servers, and it's all subject to their privacy policy. To learn more about Plausible Analytics' data practices, we encourage you to visit [their website](https://plausible.io) and dive into their [privacy policy](https://plausible.io/privacy).
2. **Sentry.io**: Ah, Sentry.io, our trusted ally in identifying and fixing errors while improving our website's performance. Sentry.io may collect certain technical information, including your IP address, browser details, and device information. The information they gather is stored on their servers, which they guard with great diligence. To learn more about Sentry.io's data practices, please visit [their website](https://sentry.io/) and cozy up with their [privacy policy](https://sentry.io/privacy/).
If you're feeling adventurous, you can find Sentry's entire collection of legal documents [on their site](https://sentry.io/legal/).
## Data Security
We take reasonable measures to protect the personal information we collect. However, let's be honest, no security measures are perfect or impenetrable. We can't promise you an impenetrable fortress, but we assure you that we're doing our best to keep your personal information safe and sound.

## Disclosure of Information

There may come a time when we need to disclose your Personal Information or Usage Information to third parties. This would only occur if required by law or when we firmly believe that such disclosure is necessary to protect our rights, comply with a judicial proceeding, court order, or legal process served upon us, or investigate suspected or actual fraudulent or illegal activities. We hope that day never comes, but it's good to be prepared.
## Children's Privacy

Please note that our website is not intended for children under the age of 13. We don't knowingly collect personal information from children under the age of 13. If you're a parent or guardian and believe that we may have inadvertently collected personal information from your child, please contact us at privacy [at] dgrebb.com. We'll promptly remove any such information, as we certainly don't want to get in trouble with the little ones.

## Changes to this Privacy Policy

We reserve the right to update or modify this Privacy Policy at any time. The most recent version will be posted on this page, with the effective date proudly displayed at the top. By continuing to use this website after any changes to the Privacy Policy, you're embracing the updated terms with open arms.
## Contact
If you have any questions, concerns, or requests regarding this Privacy Policy, don't hesitate to reach out to us at privacy [at] dgrebb.com. We're here to listen, assist, and make you smile.
By using this website, you acknowledge that you've read and understood this Privacy Policy, and you wholeheartedly consent to the collection, use, and disclosure of your information as described herein. Now go forth and explore the wonders of dgrebb.com!
6 changes: 6 additions & 0 deletions _ci/dispatches/dev.workflow_dispatch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"_note": "This is not an example or properly formatted request for the GitHub API.",
"__note": "The API takes 'ref': 'develop' instead of the fully qualified ref.",
"ref": "/refs/heads/develop",
"ref_name": "develop"
}
6 changes: 6 additions & 0 deletions _ci/dispatches/main.workflow_dispatch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"_note": "This is not an example or properly formatted request for the GitHub API.",
"__note": "The API takes 'ref': 'main' instead of the fully qualified ref.",
"ref": "/refs/heads/main",
"ref_name": "main"
}
36 changes: 36 additions & 0 deletions _ci/workflow_dispatch-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Deploy Tests

on:
workflow_dispatch

jobs:
front:
name: Frontend Test
runs-on: ubuntu-latest

environment:
name: ${{ github.ref_name == 'main' && 'prd' || 'stg' }}

steps:

- name: Branch Information
run: |
printf "\033[0;34mgithub.ref:\033[0m ${{ github.ref }}\n"
printf "\033[0;34mgithub.base_ref:\033[0m ${{ github.base_ref }}\n"
printf "\033[0;34mgithub.ref_name:\033[0m ${{ github.ref_name }}\n"
printf "\033[0;34mgithub.sha:\033[0m ${{ github.sha }}\n"
printf "\033[0;34mGITHUB_REF:\033[0m $GITHUB_REF\n"
printf "\033[0;34mGITHUB_REF_NAME:\033[0m $GITHUB_REF_NAME\n"
printf "\033[0;34mGITHUB_SHA:\033[0m $GITHUB_SHA\n"
- name: Checkout
uses: actions/checkout@v3
with:
repository: dgrebb/dgrebb.com
ref: ${{ github.ref }}
token: ${{ github.token }}
fetch-depth: 0

- name: Inspect Checkout
run: |
printf $(git log -n 5)
11 changes: 7 additions & 4 deletions _utils/_scripts/act.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
#!/bin/bash
source $directory/_scripts/functions.sh

if [[ $1 != p ]]; then EVENT_JSON="dev"; else EVENT_JSON="main"; fi

if [ $2 == "f" ]; then
action="-j front"
elif [ $2 == "b" ]; then
action="-j back"
elif [ $2 == "p" ]; then
action="push"
elif [ $2 == "d" ]; then
action="-j dispatch"
action="workflow_dispatch"
else
printDgErr "Argument needed to specify job."
fi

act --pull=false -P ubuntu-latest=github-actions-test:latest \
act --pull=false \
-P ubuntu-latest=github-actions-test:latest \
-e $directory/../_ci/dispatches/${EVENT_JSON}.workflow_dispatch.json \
-s GITHUB_TOKEN=$(pass dg/github/pat) \
-s DEPLOYMENT_BRANCH=develop \
-s PUBLIC_ENV=staging \
-s PUBLIC_ENV=development \
-s PUBLIC_MEDIA_URL="" \
-s PUBLIC_API_PATH_NAVIGATION="$(pass dg/cms/api/paths/navigation)" \
-s PUBLIC_API_PATH_HOME="$(pass dg/cms/api/paths/home)" \
Expand Down
2 changes: 1 addition & 1 deletion _utils/_scripts/front.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ while test "$1" != --; do
break
;;
p | preview)
cdfront && npm run preview
cdfront && npm run preview -- --host
break
;;
?)
Expand Down
Loading

0 comments on commit ceb9f2e

Please sign in to comment.