Merge pull request #5 from Lslightly/dependabot/uv/cryptography-46.0.5 #82
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: Build and Deploy to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Setup NodeJS | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 23 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| npm ci | |
| - name: Generate files | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }} | |
| MODEL_NAME: ${{ secrets.MODEL_NAME }} | |
| run: | | |
| mkdir public | |
| uv run python main.py | |
| npm run build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| publish_branch: gh-pages | |
| keep_files: false | |
| force_orphan: true |