Skip to content

Add Buy Me a Coffee support links #16

Add Buy Me a Coffee support links

Add Buy Me a Coffee support links #16

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: web/package-lock.json
- name: Cache strategy JSON files
id: cache-strategies
uses: actions/cache@v4
with:
path: web/public/strategies
key: strategies-${{ hashFiles('src/blackjack/**/*.py', 'scripts/generate_strategies.py', 'pyproject.toml', 'uv.lock') }}
- name: Generate strategy JSON files
if: steps.cache-strategies.outputs.cache-hit != 'true'
run: uv run python -m scripts.generate_strategies
- name: Install npm dependencies
working-directory: web
run: npm ci
- name: Build Svelte app
working-directory: web
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: web/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4