File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Deploy GitHub Pages
1+ name : My First Github Actions
22
33on :
4- workflow_run :
5- workflows : ["My First GitHub Actions"]
6- types :
7- - completed
4+ push :
5+ branches :
6+ - main
87
98permissions :
109 contents : read
1110 pages : write
1211 id-token : write
13-
12+ # on: [push]
1413jobs :
15- deploy :
14+ test :
1615 runs-on : ubuntu-latest
1716 steps :
18- - name : Download artifact
19- uses : actions/download-artifact@v4
17+ - name : Checkout Repository
18+ uses : actions/checkout@v4
19+ - name : Set up Python
20+ uses : actions/setup-python@v4
21+ with :
22+ python-version : ' 3.x'
23+ - name : Install Dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
27+ - name : Run Test
28+ run : python test.py
29+ upload-artifact :
30+ runs-on : ubuntu-latest
31+ needs : test
32+ steps :
33+ - name : Checkout Repository
34+ uses : actions/checkout@v4
35+ - name : Upload artifact for deployment
36+ uses : actions/upload-pages-artifact@v3
2037 with :
21- name : github-pages
2238 path : ./
23-
24- - name : Deploy to GitHub Pages
25- uses : actions/deploy-pages@v1
39+
40+
You can’t perform that action at this time.
0 commit comments