File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy NetSec to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main # Change this if your default branch is different
7+
8+ pull_request :
9+ branches :
10+ - main
11+
12+ workflow_dispatch : # Allows manual trigger
13+
14+ permissions :
15+ contents : read
16+ pages : write
17+ id-token : write
18+
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - name : Checkout Repository
25+ uses : actions/checkout@v4
26+
27+ - name : Set up Python
28+ uses : actions/setup-python@v4
29+ with :
30+ python-version : ' 3.x' # Change this if needed
31+
32+ - name : Install Dependencies
33+ run : |
34+ pip install -r requirements.txt
35+
36+ - name : Build the Streamlit App
37+ run : |
38+ mkdir -p build
39+ streamlit run netsec_scanner.py & # Runs in the background
40+ sleep 10 # Wait for the app to start
41+ wget -r -np -P build http://localhost:8501
42+
43+ - name : Upload GitHub Pages Artifact
44+ uses : actions/upload-pages-artifact@v2
45+ with :
46+ path : build
47+
48+ deploy :
49+ needs : build
50+ runs-on : ubuntu-latest
51+ environment :
52+ name : github-pages
53+ url : ${{ steps.deployment.outputs.page_url }}
54+
55+ steps :
56+ - name : Deploy to GitHub Pages
57+ id : deployment
58+ uses : actions/deploy-pages@v3
You can’t perform that action at this time.
0 commit comments