Merge branch 'master' into feat/ssr

pull/5494/head
Kamran Ahmed 11 months ago
commit d4a563fe49
  1. 72
      .github/workflows/rsync-ssr.yml
  2. 12
      src/components/Navigation/Navigation.astro
  3. 2
      src/data/roadmaps/system-design/content/116-performance-antipatterns/102-chatty-io.md
  4. 8
      src/pages/account/index.astro

@ -0,0 +1,72 @@
name: Deploy to EC2
on:
workflow_dispatch: # allow manual run
push:
branches:
- feat/ssr
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20
- uses: pnpm/action-setup@v3.0.0
with:
version: 8.15.6
# --------------------
# Setup configuration
# --------------------
- name: Prepare configuration files
run: |
git clone https://${{ secrets.GH_PAT }}@github.com/roadmapsh/infra-config.git configuration --depth 1
- name: Copy configuration files
run: |
cp configuration/dist/github/developer-roadmap.env .env
# --------------------
# Prepare the build
# --------------------
- name: Install dependencies
run: |
pnpm install
- name: Generate build
run: |
git clone https://${{ secrets.GH_PAT }}@github.com/roadmapsh/web-draw.git .temp/web-draw --depth 1
npm run generate-renderer
npm run build
# --------------------
# Deploy to EC2
# --------------------
- uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.EC2_PRIVATE_KEY }}
- name: Deploy app to EC2
run: |
rsync -apvz --delete --no-times --exclude "configuration" -e "ssh -o StrictHostKeyChecking=no" -p ./ ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }}:/var/www/v2.roadmap.sh/
- name: Restart PM2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
script: |
cd /var/www/v2.roadmap.sh
sudo pm2 restart web-roadmap
# --------------------
# Clear Cloudfront Caching
# --------------------
- name: Clear Cloudfront Caching
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GH_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/roadmapsh/infra-ansible/actions/workflows/playbook.yml/dispatches \
-d '{ "ref":"master", "inputs": { "playbook": "roadmap_web.yml", "tags": "cloudfront", "is_verbose": false } }'

@ -17,12 +17,10 @@ import { AccountDropdown } from './AccountDropdown';
</a>
<a
target='_blank'
rel='noreferrer nofollow'
href='https://boards.greenhouse.io/insightmediagroupllc/jobs/4002116008'
href='/ai'
class='group inline sm:hidden relative !mr-2 text-blue-300 hover:text-white'
>
We're Hiring
AI Roadmaps&nbsp;
<span class='absolute -right-[11px] top-0'>
<span class='relative flex h-2 w-2'>
@ -43,12 +41,10 @@ import { AccountDropdown } from './AccountDropdown';
</a>
<a href='/teams' class='text-gray-400 hover:text-white'> Teams</a>
<a
target='_blank'
rel='noreferrer nofollow'
href='https://boards.greenhouse.io/insightmediagroupllc/jobs/4002116008'
href='/ai'
class='group relative !mr-2 text-blue-300 hover:text-white'
>
We're Hiring
AI Roadmaps
<span class='absolute -right-[11px] top-0'>
<span class='relative flex h-2 w-2'>

@ -1,4 +1,4 @@
# Chat I/O
# Chatty I/O
The cumulative effect of a large number of I/O requests can have a significant impact on performance and responsiveness.

@ -4,8 +4,12 @@ import { ActivityPage } from '../../components/Activity/ActivityPage';
import AccountLayout from '../../layouts/AccountLayout.astro';
---
<AccountLayout title='Update Profile' noIndex={true} initialLoadingMessage={'Loading activity'}>
<AccountLayout
title='Activity'
noIndex={true}
initialLoadingMessage={'Loading activity'}
>
<AccountSidebar activePageId='activity' activePageTitle='Activity'>
<ActivityPage client:only="react" />
<ActivityPage client:only='react' />
</AccountSidebar>
</AccountLayout>

Loading…
Cancel
Save