Skip to content

Commit

Permalink
Updated Nov 23 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiangyuan Li authored and Jiangyuan Li committed Nov 23, 2024
1 parent 77e7fa6 commit a172c5b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ name: Deploy Flask to GitHub Pages
on:
push:
branches:
- main # Deploy when changes are pushed to the main branch
- main # Run the workflow on changes to the main branch

permissions:
actions: write
id-token: write
contents: write # Grant permission to write to the repository
pages: write # Grant permission to GitHub Pages
contents: write # Allow writing to the repository (used for artifacts)
pages: write # Required for GitHub Pages deployments

jobs:
build:
Expand All @@ -32,21 +30,21 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
# Step 4: Run flask freeze
- name: Freeze Flask App
run: |
python freeze.py # Generate static files into the './build' directory
python freeze.py # Generate static files in the './build' directory
- name: Upload artifact for Pages
uses: actions/upload-pages-artifact@v1
with:
path: ./build # Specify the folder containing the static files
path: ./build # Specify the folder containing static files

deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write # Grant permissions to deploy to GitHub Pages
id-token: write # Required for OpenID Connect (OIDC) authentication
pages: write # Required for GitHub Pages deployments
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2

0 comments on commit a172c5b

Please sign in to comment.