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
|
Reference in New Issue
Block a user