Skip to content

remove ...

remove ... #113

name: Deploy frontend to GitHub Pages
on:
push:
branches: [ main ]
paths:
- 'frontend/**'
- '.github/workflows/deploy-frontend.yml'
workflow_dispatch: {}
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# -------------------------
# Clone the repository
# -------------------------
- name: Checkout repository
uses: actions/checkout@v4
# -------------------------
# Set up Node & caching
# -------------------------
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
# -------------------------
# Install dependencies
# -------------------------
- name: Install dependencies
working-directory: frontend
run: npm ci
# -------------------------
# Build the frontend
# -------------------------
- name: Build frontend
working-directory: frontend
env:
VITE_API_BASE: ${{ secrets.VITE_API_BASE }}
run: npm run build
# -------------------------
# Deploy /dist to gh-pages
# -------------------------
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./frontend/dist
cname: autotrac.slothsintel.com