-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from dgrebb/develop
Release 2.0.0
- Loading branch information
Showing
186 changed files
with
9,703 additions
and
9,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"commitizen": { | ||
"name": "cz_conventional_commits", | ||
"version": "2.0.0", | ||
"tag_format": "$major.$minor.$patch$prerelease", | ||
"version_type": "semver", | ||
"bump_message": "release $current_version \u2192 $new_version" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Bugs | ||
about: the horror to fixeth | ||
title: "[BUG] - " | ||
labels: bug | ||
assignees: dgrebb | ||
|
||
--- | ||
|
||
**wot** | ||
|
||
**steps** | ||
|
||
**snaps** | ||
|
||
**supplements** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: Feature | ||
about: New Features | ||
title: "[FEAT] - " | ||
labels: enhancement | ||
assignees: dgrebb | ||
|
||
--- | ||
|
||
# Requirements | ||
|
||
1. | ||
|
||
# Implementation | ||
|
||
1. | ||
|
||
# Testing | ||
|
||
|
||
|
||
# Snaps | ||
|
||
|
||
|
||
# Supplementary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build & Deploy Backend | ||
|
||
on: | ||
repository_dispatch: | ||
types: | ||
- Backend | ||
|
||
jobs: | ||
back: | ||
name: Backend | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: ${{ github.ref == 'refs/heads/main' && 'prd' || 'stg' }} | ||
|
||
steps: | ||
- name: To Do | ||
run: echo "Build the backend workflow" | ||
# - name: (Optional) Local Docker Package Install | ||
# if: ${{ env.ACT }} | ||
# run: | | ||
# apt-get update | ||
# apt-get install -y wget curl unzip | ||
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
# unzip awscliv2.zip | ||
# ./aws/install | ||
|
||
# - name: Add Masks | ||
# run: | | ||
# echo "::add-mask::${{ github.token }}" | ||
# echo "::add-mask::${{ secrets.PUBLIC_API_URL }}" | ||
# 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 }} | ||
# token: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Build & Deploy Frontend | ||
|
||
on: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
types: | ||
- Frontend | ||
- Strapi | ||
|
||
jobs: | ||
front: | ||
name: Frontend | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: ${{ github.ref == 'refs/heads/main' && 'prd' || 'stg' }} | ||
|
||
steps: | ||
- name: (Optional) Local Docker Package Install | ||
if: ${{ env.ACT }} | ||
run: | | ||
apt-get update | ||
apt-get install -y wget curl unzip | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip | ||
./aws/install | ||
- 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 }} | ||
token: ${{ github.token }} | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.x" | ||
|
||
- name: Set .env | ||
run: | | ||
touch front/.env | ||
echo PUBLIC_MEDIA_URL='' >> front/.env | ||
echo PUBLIC_API_URL='${{ secrets.PUBLIC_API_URL }}' >> front/.env | ||
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 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: Build | ||
id: npm-build | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: bash _ci/build.sh | ||
|
||
- name: Robots | ||
if: ${{ github.ref == 'main' }} | ||
run: | | ||
sed -i 's/^Disallow\: \/$/Allow\: \//' front/build/robots.txt | ||
- name: Deploy | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read --follow-symlinks --delete | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SOURCE_DIR: "front/build" | ||
|
||
- name: Invalidate CloudFront | ||
uses: chetan/invalidate-cloudfront-action@v2 | ||
env: | ||
DISTRIBUTION: ${{ secrets.DISTRIBUTION }} | ||
PATHS: "/*" | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Dispatch Build & Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
backend: ${{ steps.changes.outputs.backend }} | ||
frontend: ${{ steps.changes.outputs.frontend }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
base: ${{ secrets.DEPLOYMENT_BRANCH }} | ||
filters: | | ||
backend: | ||
- 'back/**' | ||
frontend: | ||
- 'front/**' | ||
# backend: | ||
# needs: changes | ||
# if: ${{ needs.changes.outputs.backend == 'true' }} | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
|
||
# - name: Add Masks | ||
# run: | | ||
# echo "::add-mask::${{ secrets.DISPATCH_TOKEN }}" | ||
|
||
# - name: Dispatch Backend | ||
# run: | | ||
# curl -X POST https://api.github.com/repos/dgrebb/dgrebb.com/dispatches \ | ||
# -H 'Accept: application/vnd.github.everest-preview+json' \ | ||
# -H 'Authorization: Bearer ${{ secrets.DISPATCH_TOKEN }}' \ | ||
# --data '{"event_type": "Backend"}' | ||
|
||
frontend: | ||
needs: changes | ||
if: ${{ needs.changes.outputs.frontend == 'true' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Add Masks | ||
run: | | ||
echo "::add-mask::${{ secrets.DISPATCH_TOKEN }}" | ||
- name: Dispatch Frontend | ||
run: | | ||
curl -X POST https://api.github.com/repos/dgrebb/dgrebb.com/dispatches \ | ||
-H 'Accept: application/vnd.github.everest-preview+json' \ | ||
-H 'Authorization: Bearer ${{ secrets.DISPATCH_TOKEN }}' \ | ||
--data '{"event_type": "Frontend"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.