Skip to content

Fix GitHub Actions workflow: update API URL to correct Railway domain #7

Fix GitHub Actions workflow: update API URL to correct Railway domain

Fix GitHub Actions workflow: update API URL to correct Railway domain #7

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: |
cd frontend
npm ci
- name: Build
run: |
cd frontend
npm run build
env:
VITE_API_BASE_URL: https://auto-gpt-stock-production.up.railway.app
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/dist
cname: # 如果有自定义域名,在这里设置