Skip to content

Commit

Permalink
Upload posts to r2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Aug 20, 2024
1 parent 9fbeab6 commit 412cfa6
Show file tree
Hide file tree
Showing 5 changed files with 1,571 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/data-fetcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Fetch Data
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
env:
NODE_VERSION: "20"

jobs:
ingest:
name: Ingest
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: pnpm install
- name: Upload to R2
run: pnpm upload-to-r2
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,34 @@
"packageManager": "[email protected]",
"name": "oghunt",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"upload-to-r2": "tsx scripts/upload-to-r2.ts"
},
"dependencies": {
"date-fns": "^3.6.0",
"@vercel/analytics": "^1.3.1",
"date-fns": "^3.6.0",
"next": "14.2.5",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.633.0",
"@tailwindcss/line-clamp": "^0.4.4",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"dotenv": "^16.4.5",
"eslint": "^8",
"eslint-config-next": "14.2.5",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"tsx": "^4.17.0",
"typescript": "^5"
}
}
Loading

0 comments on commit 412cfa6

Please sign in to comment.