Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 27da390

Browse files
authored
Update python-app.yml
try GitHub-pages deploy. (dry run)
1 parent 3ef2f75 commit 27da390

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

.github/workflows/python-app.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
branches: [ main ]
1212

1313
jobs:
14-
build:
14+
test:
1515

1616
runs-on: ubuntu-latest
1717

@@ -29,3 +29,54 @@ jobs:
2929
- name: Test with pytest
3030
run: |
3131
pytest -s -v tests
32+
33+
deploy:
34+
runs-on: ubuntu-latest
35+
needs: test
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Set up Python 3.9
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: 3.9
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install --upgrade pip
45+
pip install -r requirements.txt
46+
mkdir lib ;
47+
pip install -t lib/ flask ;
48+
ls lib ;
49+
- name: Build pages
50+
run: |
51+
make html
52+
- name: GitHub Pages
53+
# You may pin to the exact commit or the version.
54+
# uses: crazy-max/ghaction-github-pages@db4476a01402e1a7ce05f41832040eef16d14925
55+
uses: crazy-max/[email protected]
56+
with:
57+
# Git domain (default github.com)
58+
# domain: # optional, default is github.com
59+
# GitHub repository where assets will be deployed (default $GITHUB_REPOSITORY)
60+
# repo: # optional
61+
# Git branch where assets will be deployed
62+
# target_branch: # optional, default is gh-pages
63+
# Create incremental commit instead of doing push force
64+
# keep_history: # optional, default is false
65+
# Allow an empty commit to be created
66+
# allow_empty_commit: # optional, default is true
67+
# Build directory to deploy
68+
build_dir: _build/html
69+
# The committer name and email address
70+
# committer: # optional
71+
# The author name and email address
72+
# author: # optional
73+
# Commit message
74+
# commit_message: # optional
75+
# Write the given domain name to the CNAME file
76+
# fqdn: # optional
77+
# Allow Jekyll to build your site
78+
jekyll: false # optional, default is true
79+
# If enabled, nothing will be pushed
80+
dry_run: true # optional, default is false
81+
# Enable verbose output
82+
verbose: true # optional, default is false

0 commit comments

Comments
 (0)