Add GitHub Actions deployment workflows and cloud platform configs
This commit is contained in:
35
.github/workflows/deploy.yml
vendored
Normal file
35
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
name: Deploy to Vercel
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main, master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run tests (if any)
|
||||||
|
run: npm test --if-present
|
||||||
|
|
||||||
|
- name: Deploy to Vercel
|
||||||
|
uses: amondnet/vercel-action@v25
|
||||||
|
with:
|
||||||
|
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
||||||
|
vercel-org-id: ${{ secrets.ORG_ID }}
|
||||||
|
vercel-project-id: ${{ secrets.PROJECT_ID }}
|
||||||
|
vercel-args: '--prod'
|
19
.github/workflows/railway-deploy.yml
vendored
Normal file
19
.github/workflows/railway-deploy.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: Deploy to Railway
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Deploy to Railway
|
||||||
|
uses: railway/deploy@v1
|
||||||
|
with:
|
||||||
|
railway_token: ${{ secrets.RAILWAY_TOKEN }}
|
||||||
|
service: jaryo-file-manager
|
12
render.yaml
Normal file
12
render.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
services:
|
||||||
|
- type: web
|
||||||
|
name: jaryo-file-manager
|
||||||
|
env: node
|
||||||
|
plan: free
|
||||||
|
buildCommand: npm install
|
||||||
|
startCommand: npm start
|
||||||
|
envVars:
|
||||||
|
- key: NODE_ENV
|
||||||
|
value: production
|
||||||
|
- key: PORT
|
||||||
|
value: 10000
|
23
vercel.json
Normal file
23
vercel.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"builds": [
|
||||||
|
{
|
||||||
|
"src": "server.js",
|
||||||
|
"use": "@vercel/node"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"src": "/(.*)",
|
||||||
|
"dest": "/server.js"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"NODE_ENV": "production"
|
||||||
|
},
|
||||||
|
"functions": {
|
||||||
|
"server.js": {
|
||||||
|
"maxDuration": 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user