Skip to content

Commit

Permalink
Added Pipeline
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 7e1da29 commit 25d8214
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11,563 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Deploy Frozen Flask to GitHub Pages
name: Deploy Flask App to GitHub Pages

on:
push:
branches:
- main # Run this workflow on pushes to the main branch
- main # Trigger the workflow on pushes to the main branch

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
# Step 1: Set up Python
- name: Set up Python 3.6
# Step 1: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.6
python-version: 3.9

# Step 2: Checkout the code
- name: Checkout code
Expand All @@ -24,18 +24,18 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r dependencies.txt
pip install -r requirements.txt
# Step 4: Freeze the Flask app
- name: Freeze the Flask app
# Step 4: Run Flask to Generate Static Content
- name: Serve Flask App
env:
FLASK_APP: app.py
run: |
flask freeze
flask run --host=0.0.0.0 --port=5000 # Flask serves the site
# Step 5: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build # Use the output directory from `flask freeze`
publish_dir: . # Publish the current repo structure
120 changes: 0 additions & 120 deletions build/index.html

This file was deleted.

Binary file removed build/static/.DS_Store
Binary file not shown.
Loading

0 comments on commit 25d8214

Please sign in to comment.