This repository was archived by the owner on Apr 9, 2026. It is now read-only.
Add OpenAPI export functionality and initial API specification #81
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy React Frontend to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] # Trigger workflow on pushes to the 'main' branch | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./frontend # Set the working directory for all 'run' steps | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "lts/*" # Use the latest LTS version of Node.js | |
| - name: Install dependencies | |
| run: npm install # Or yarn install, depending on your project | |
| - name: Build React App | |
| run: npm run build # Or yarn build, depending on your project | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: frontend/build # The folder containing your React build output (usually 'build' or 'dist') | |
| branch: gh-pages # The branch to deploy to (must match your GitHub Pages source branch) | |
| repository-name: ${{ github.repository }} # Optional, but good practice to be explicit | |
| token: ${{ secrets.GITHUB_TOKEN }} # Use the built-in GITHUB_TOKEN secret | |