Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AWS CDK to Latest! 😶‍🌫️ (+ convert pages to typescript) #202

Merged
merged 12 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 20 additions & 23 deletions .github/workflows/aws-deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ jobs:
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ap-southeast-2

# log the sha 256 hash of the redis dump
# - name: Log Redis Dump Hash
# run: sha256sum ./.redis/dump.rdb

# start redis & check if it is running
- name: Start Redis
working-directory: ./crawler
Expand All @@ -78,16 +74,16 @@ jobs:

# Install + Cache Crawler Dependencies
- name: Cache Node Modules | Crawler
id: cache-crawler-npm
id: cache-crawler-yarn
uses: actions/cache@v3
env:
cache-name: cache-crawler-npm
cache-name: cache-crawler-yarn
with:
path: ./crawler/node_modules/
key: cache-crawler-yarn-${{ hashFiles('crawler/yarn.lock') }}

- name: Install Node Modules | Crawler
if: steps.cache-crawler-npm.outputs.cache-hit != 'true'
if: steps.cache-crawler-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ./crawler

Expand All @@ -102,22 +98,23 @@ jobs:

# Install + Cache Frontend Dependencies
- name: Cache Node Modules | Frontend
id: cache-frontend-npm
id: cache-frontend-yarn
uses: actions/cache@v3
env:
cache-name: cache-frontend-npm
cache-name: cache-frontend-yarn
with:
path: ${{ github.workspace }}/frontend/node_modules/
key: cache-frontend-npm-${{ hashFiles('frontend/yarn.lock') }}
path: ./frontend/node_modules/
key: cache-frontend-yarn-${{ hashFiles('frontend/yarn.lock') }}

- name: Install Node Modules | Frontend
if: steps.cache-frontend-npm.outputs.cache-hit != 'true'
if: steps.cache-frontend-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend

# Build Frontend to ./frontend/dist
- name: Build the Frontend
run: yarn build
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend

- name: Create CDK Config JSON
id: create-json
Expand All @@ -129,42 +126,42 @@ jobs:

# Install + Cache CDK Dependencies
- name: Cache Node Modules | CDK
id: cache-cdk-npm
id: cache-cdk-yarn
uses: actions/cache@v3
env:
cache-name: cache-cdk-npm
cache-name: cache-cdk-yarn
with:
path: ./cdk/node_modules/
key: cache-cdk-npm-${{ hashFiles('cdk/package-lock.json') }}
key: cache-cdk-yarn-${{ hashFiles('cdk/yarn.lock') }}

- name: Install Node Modules | CDK
if: steps.cache-cdk-npm.outputs.cache-hit != 'true'
run: npm ci
if: steps.cache-cdk-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ./cdk

- name: CDK Bootstrap
run: ./node_modules/.bin/cdk bootstrap
run: yarn bootstrap
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: CDK Synth
run: ./node_modules/.bin/cdk synthesize --all
run: yarn synth
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: CDK Diff
run: ./node_modules/.bin/cdk diff --all
run: yarn diff
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: CDK Deploy
run: ./node_modules/.bin/cdk deploy --all --require-approval never
run: yarn deploy:ci
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
42 changes: 19 additions & 23 deletions .github/workflows/aws-deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ jobs:
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ap-southeast-2

# log the sha 256 hash of the redis dump
- name: Log Redis Dump Hash
run: sha256sum ./.redis/dump.rdb

# start redis & check if it is running
- name: Start Redis
working-directory: ./crawler
Expand All @@ -77,16 +73,16 @@ jobs:

# Install + Cache Crawler Dependencies
- name: Cache Node Modules | Crawler
id: cache-crawler-npm
id: cache-crawler-yarn
uses: actions/cache@v3
env:
cache-name: cache-crawler-npm
cache-name: cache-crawler-yarn
with:
path: ./crawler/node_modules/
key: cache-crawler-yarn-${{ hashFiles('crawler/yarn.lock') }}

- name: Install Node Modules | Crawler
if: steps.cache-crawler-npm.outputs.cache-hit != 'true'
if: steps.cache-crawler-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ./crawler

Expand All @@ -101,22 +97,22 @@ jobs:

# Install + Cache Frontend Dependencies
- name: Cache Node Modules | Frontend
id: cache-frontend-npm
id: cache-frontend-yarn
uses: actions/cache@v3
env:
cache-name: cache-frontend-npm
cache-name: cache-frontend-yarn
with:
path: ${{ github.workspace }}/frontend/node_modules/
key: cache-frontend-npm-${{ hashFiles('frontend/yarn.lock') }}
path: ./frontend/node_modules/
key: cache-frontend-yarn-${{ hashFiles('frontend/yarn.lock') }}

- name: Install Node Modules | Frontend
if: steps.cache-frontend-npm.outputs.cache-hit != 'true'
if: steps.cache-frontend-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend

- name: Build the Frontend
run: yarn build
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend

- name: Create CDK Config JSON
id: create-json
Expand All @@ -128,42 +124,42 @@ jobs:

# Install + Cache CDK Dependencies
- name: Cache Node Modules | CDK
id: cache-cdk-npm
id: cache-cdk-yarn
uses: actions/cache@v3
env:
cache-name: cache-cdk-npm
cache-name: cache-cdk-yarn
with:
path: ./cdk/node_modules/
key: cache-cdk-npm-${{ hashFiles('cdk/package-lock.json') }}
key: cache-cdk-yarn-${{ hashFiles('cdk/yarn.lock') }}

- name: Install Node Modules | CDK
if: steps.cache-cdk-npm.outputs.cache-hit != 'true'
run: npm ci
if: steps.cache-cdk-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ./cdk

- name: CDK Bootstrap
run: ./node_modules/.bin/cdk bootstrap
run: yarn bootstrap
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: CDK Synth
run: ./node_modules/.bin/cdk synthesize --all
run: yarn synth
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: CDK Diff
run: ./node_modules/.bin/cdk diff --all
run: yarn diff
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: CDK Deploy
run: ./node_modules/.bin/cdk deploy --all --require-approval never
run: yarn deploy:ci
working-directory: ./cdk
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/crawler-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ jobs:

# Install + Cache Crawler Dependencies
- name: Cache Node Modules | Crawler
id: cache-crawler-npm
id: cache-crawler-yarn
uses: actions/cache@v3
env:
cache-name: cache-crawler-npm
cache-name: cache-crawler-yarn
with:
path: ${{ github.workspace }}/crawler/node_modules/
path: ./crawler/node_modules/
key: cache-crawler-yarn-${{ hashFiles('crawler/yarn.lock') }}

- name: Install Node Modules | Crawler
if: steps.cache-crawler-npm.outputs.cache-hit != 'true'
if: steps.cache-crawler-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ${{ github.workspace }}/crawler
working-directory: ./crawler

- name: Check Style | Crawler
run: yarn format
working-directory: ${{ github.workspace }}/crawler
working-directory: ./crawler

crawler-checks-types:
runs-on: ubuntu-latest
Expand All @@ -56,19 +56,19 @@ jobs:

# Install + Cache Crawler Dependencies
- name: Cache Node Modules | Crawler
id: cache-crawler-npm
id: cache-crawler-yarn
uses: actions/cache@v3
env:
cache-name: cache-crawler-npm
cache-name: cache-crawler-yarn
with:
path: ${{ github.workspace }}/crawler/node_modules/
path: ./crawler/node_modules/
key: cache-crawler-yarn-${{ hashFiles('crawler/yarn.lock') }}

- name: Install Node Modules | Crawler
if: steps.cache-crawler-npm.outputs.cache-hit != 'true'
if: steps.cache-crawler-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ${{ github.workspace }}/crawler
working-directory: ./crawler

- name: Check Style | Crawler
run: yarn check:ts
working-directory: ${{ github.workspace }}/crawler
working-directory: ./crawler
28 changes: 14 additions & 14 deletions .github/workflows/frontend-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ jobs:

# Install + Cache Frontend Dependencies
- name: Cache Node Modules | Frontend
id: cache-frontend-npm
id: cache-frontend-yarn
uses: actions/cache@v3
env:
cache-name: cache-frontend-npm
cache-name: cache-frontend-yarn
with:
path: ${{ github.workspace }}/frontend/node_modules/
key: cache-frontend-npm-${{ hashFiles('frontend/yarn.lock') }}
path: ./frontend/node_modules/
key: cache-frontend-yarn-${{ hashFiles('frontend/yarn.lock') }}

- name: Install Node Modules | Frontend
if: steps.cache-frontend-npm.outputs.cache-hit != 'true'
if: steps.cache-frontend-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend

- name: Check Style | Frontend
run: yarn format:check
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend

frontend-checks-types:
runs-on: ubuntu-latest
Expand All @@ -56,19 +56,19 @@ jobs:

# Install + Cache Frontend Dependencies
- name: Cache Node Modules | Frontend
id: cache-frontend-npm
id: cache-frontend-yarn
uses: actions/cache@v3
env:
cache-name: cache-frontend-npm
cache-name: cache-frontend-yarn
with:
path: ${{ github.workspace }}/frontend/node_modules/
key: cache-frontend-npm-${{ hashFiles('frontend/yarn.lock') }}
path: ./frontend/node_modules/
key: cache-frontend-yarn-${{ hashFiles('frontend/yarn.lock') }}

- name: Install Node Modules | Frontend
if: steps.cache-frontend-npm.outputs.cache-hit != 'true'
if: steps.cache-frontend-yarn.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend

- name: Check Types | Frontend
run: yarn check:ts
working-directory: ${{ github.workspace }}/frontend
working-directory: ./frontend
Loading
Loading