-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (35 loc) · 861 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Build and Run
on:
push:
branches:
- main
jobs:
build-and-run:
runs-on: ubuntu-latest
steps:
- name: 1. Checkout repository
uses: actions/checkout@v2
- name: 2. Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: 3. Install
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: 4. Run
run: |
python ./main.py &
sleep 7
- name: 5. Build
run: |
wget http://localhost:7777
- name: 6. Log
run: |
mv *.log static/
- name: 7. Push static HTML
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./static
publish_branch: html