-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d99cda2
commit 6a8feb2
Showing
2 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
- '*' | ||
|
||
jobs: | ||
piepline: | ||
test: | ||
name: Build and test rfhub2 | ||
runs-on: ubuntu-latest | ||
services: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: rfhub2-push-and-deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'rfhub2/version.py' | ||
|
||
jobs: | ||
push: | ||
name: Push rfhub2 to PyPI | ||
if: steps.extract_branch.outputs.branch == 'master' | ||
needs: test | ||
runs-on: ubuntu-latest | ||
node-version: 13.x | ||
python-version: 3.8 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ python-version }} | ||
|
||
- name: Cache Python packages | ||
uses: actions/cache@v1 | ||
id: cache-pip | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt', '**/requirements-postgres.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt', '**/requirements-postgres.txt') }} | ||
- name: Use Node.js ${{ node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ node-version }} | ||
|
||
- name: Install yarn dependencies | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
working-directory: frontend | ||
|
||
- name: Build UI | ||
run: ./build_ui.sh | ||
|
||
- name: Build rfhub2 python package | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
|
||
- name: Deploy to Heroku | ||
uses: Suvink/[email protected] | ||
with: | ||
heroku_app_name: rfhub2-demo | ||
heroku_email: [email protected] | ||
dontuseforce: false | ||
env: | ||
HEROKU_TOKEN: '${{ secrets.HEROKU_AUTH_TOKEN }}' | ||
BOT_TOKEN: '${{ secrets.BOT_TOKEN }}' | ||
CHAT_ID: '${{ secrets.CHAT_ID }}' |