Add Plugin AutoReload #24
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 API (GitHub Pages) | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build static API | |
| run: | | |
| python3 --version | |
| python3 scripts/API/emit_static_api.py | |
| echo "[ls] public/" | |
| ls -lah public || true | |
| echo "[ls] public/api/" | |
| ls -lah public/api || true | |
| echo "[ls] public/api/v1/" | |
| ls -lah public/api/v1 || true | |
| test -f public/api/v1/index.json || { echo "::error ::public/api/v1/index.json missing"; exit 1; } | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |