Skip to content

Commit

Permalink
GitHub Actions로 Vercel에 배포
Browse files Browse the repository at this point in the history
  • Loading branch information
lexifdev committed Aug 23, 2024
1 parent 05a6477 commit 3a8e2d7
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install Vercel CLI
run: bun install -g vercel@latest

- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install dependencies
run: pip install -r requirements.txt

- name: Download database
run: wget -O db.sqlite3 ${{ secrets.DB_FILE_URL }}

- name: Deploy to Vercel
run: vercel --token ${{ secrets.VERCEL_TOKEN }} --prod
23 changes: 23 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": 2,
"builds": [
{
"src": "anijung/wsgi.py",
"use": "@vercel/python"
},
{
"src": "/static/**",
"use": "@vercel/static"
}
],
"routes": [
{
"src": "/static/(.*)",
"dest": "/staticfiles/$1"
},
{
"src": "/(.*)",
"dest": "anijung/wsgi.py"
}
]
}

0 comments on commit 3a8e2d7

Please sign in to comment.