Skip to content

Commit f15c358

Browse files
author
apollo
committed
split package deployment from document
1 parent 0f555c8 commit f15c358

File tree

3 files changed

+49
-23
lines changed

3 files changed

+49
-23
lines changed

.github/workflows/mpqp_prod.yml

+2-22
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,9 @@ on:
66
- main
77
push:
88
branches:
9-
- main
10-
11-
jobs:
12-
build_publish_package:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout Repository
16-
uses: actions/checkout@v4
17-
- name: Install Dependencies
18-
run: |
19-
pip install -r requirements-dev.txt
20-
- name: Build Package
21-
run: python setup.py sdist bdist_wheel
22-
- name: Install Twine
23-
run: |
24-
pip install twine
25-
- name: Publish to PyPI
26-
run: |
27-
twine upload dist/*
28-
env:
29-
TWINE_USERNAME: __token__
30-
TWINE_PASSWORD: ${{ secrets.PRD_QT_API_TOKEN }}
9+
- main
3110

11+
jobs:
3212
build_publish_docs:
3313
# Deploy to cloudflare
3414
runs-on: ubuntu-latest

.github/workflows/mpqp_tag.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build_publish_package:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
- name: Install Dependencies
15+
run: |
16+
pip install -r requirements-dev.txt
17+
- name: Build Package
18+
run: python setup.py sdist bdist_wheel
19+
- name: Install Twine
20+
run: |
21+
pip install twine
22+
- name: Publish to PyPI
23+
run: |
24+
twine upload dist/*
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.PRD_QT_API_TOKEN }}
28+
29+
build_publish_docs:
30+
# Deploy to cloudflare
31+
runs-on: ubuntu-latest
32+
needs: build_publish_package
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Build Document
37+
run: |
38+
pip install -r requirements-dev.txt
39+
sphinx-build -b html docs build
40+
- name: Publish
41+
uses: cloudflare/pages-action@1
42+
with:
43+
apiToken: ${{ secrets.PRD_CLOUDFLARE_API_TOKEN }}
44+
accountId: ${{ secrets.PRD_CLOUDFLARE_ACCOUNT_ID }}
45+
projectName: mpqp
46+
directory: build

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
![license badge](https://img.shields.io/github/license/ColibrITD-SAS/mpqp)
2-
![test status badge](https://img.shields.io/github/actions/workflow/status/ColibrITD-SAS/mpqp/test?label=tests)
2+
![test status badge](https://img.shields.io/github/actions/workflow/status/ColibrITD-SAS/mpqp/mpqp_dev.yml?branch=dev)
33
![doc status badge](https://img.shields.io/github/actions/workflow/status/ColibrITD-SAS/mpqp/doc?label=doc)
44
![pipy deployment status badge](https://img.shields.io/github/actions/workflow/status/ColibrITD-SAS/mpqp/pipy?label=pipy)
55

0 commit comments

Comments
 (0)