-
Notifications
You must be signed in to change notification settings - Fork 12
80 lines (66 loc) · 2.11 KB
/
cd.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
##
## =====================================================================================
## C O P Y R I G H T
## -------------------------------------------------------------------------------------
## Copyright (c) 2023 by Robert Bosch GmbH. All rights reserved.
##
## Author(s):
## - Markus Braun, :em engineering methods AG (contracted by Robert Bosch GmbH)
## =====================================================================================
##
name: CD
on:
release:
types: [published]
permissions:
contents: write
env:
python-version: 3.9
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
- name: "Ensure Python Environment"
uses: ./.github/actions/init
with:
python-version: 3.9
- name: "Build documentation"
run: |
make html
- name: "Build pypi package"
run: |
poetry build
- name: "Build pex package"
run: |
(rm -rf .pex_tmp || true)
mkdir .pex_tmp
cp -R doxysphinx .pex_tmp
poetry export -f requirements.txt --without-hashes -o .requirements.txt
poetry run pex --requirement=.requirements.txt --entry-point doxysphinx.cli:cli --sources-directory=.pex_tmp --output-file=dist/doxysphinx.pex
- name: "Deploy to pypi repository"
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
poetry publish
- name: "Deploy binaries to gh-release"
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUBTOKEN }}
files: |
dist/*.*
- name: "Upload documentation as artifact"
uses: actions/upload-artifact@v2
with:
name: Project documentation
path: ${{ github.workspace }}/.build/html
- name: "Publish documentation on gh-pages"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Action doesnt take default working-directory into account
publish_dir: ${{ github.workspace }}/.build/html