Skip to content

Commit 827f794

Browse files
Deploy (#4)
* pypi deployment * Add deployment of manual * Update deploy workflows
1 parent 8d3e750 commit 827f794

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish pybdsim to PyPi
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger only on tags like v1.2.3
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
21+
- name: Install build tools
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install build
25+
26+
- name: Build package
27+
run: |
28+
python -m build
29+
30+
# - name: Publish to PyPI
31+
# uses: pypa/[email protected]
32+
# with:
33+
# password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/deploymanual.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: manual deploy
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
manual-deploy:
15+
name: manual deploy
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- name: Checkout pybdsim
22+
uses: actions/checkout@v4
23+
id: checkout
24+
25+
- name: Build manual
26+
shell: bash
27+
run: |
28+
# docs dir
29+
cd docs
30+
31+
# make html
32+
make html
33+
34+
- name: Upload manuals
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: manuals
38+
path: ${{ github.workspace }}/docs/html
39+
40+
- name: Deploy to GitHub Pages
41+
uses: peaceiris/actions-gh-pages@v3
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_branch: gh-pages
45+
publish_dir: ${{ github.workspace }}/docs/html
46+
allow_empty_commit: true
47+

0 commit comments

Comments
 (0)