-
-
Notifications
You must be signed in to change notification settings - Fork 101
/
.travis.yml
47 lines (35 loc) · 1.07 KB
/
.travis.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
45
46
47
dist: focal
language: python
python:
- 3.11
cache:
pip: true
before_install:
- curl -sSL https://install.python-poetry.org | python3 -
- make doctor
install:
- make install
script:
- make all
after_script: >
echo $TRAVIS_BRANCH; echo $TRAVIS_PULL_REQUEST;
if [[ $TRAVIS_BRANCH == 'main' && $TRAVIS_PULL_REQUEST == 'false' ]]; then
# Configure Git with Travis CI information
git config --global user.email "travis@travis-ci.org" ;
git config --global user.name "travis-ci" ;
# Delete the current repository
rm -rf .git ;
# Clone the destination repository
git clone https://${GH_TOKEN}@github.com/jacebrowning/template-python-demo temp ;
mv temp/.git TemplateDemo/.git ;
rm -rf temp ;
# Rebuild the repository from the generated files and push to GitHub
cd TemplateDemo ;
git add --all ;
git commit -m "Deploy Travis CI build $TRAVIS_BUILD_NUMBER to GitHub" ;
git push -f https://${GH_TOKEN}@github.com/jacebrowning/template-python-demo main ;
fi
notifications:
email:
on_success: never
on_failure: never