Debian Codegraph @

.github/workflows/build.yml

raw
1 ---
2 name: Build
3
4 on: # yamllint disable-line rule:truthy
5 push:
6 branches:
7 - main
8 workflow_dispatch:
9
10 jobs:
11 PyPI:
12 name: Build and publish Python distributions to TestPyPI
13 runs-on: ubuntu-latest
14 steps:
15 - uses: actions/checkout@master
16 - uses: pdm-project/setup-pdm@main
17 name: Setup Python and PDM
18 with:
19 python-version: 3.9
20 - name: Build package
21 run: make build-package
22 - name: Publish distribution to Test PyPI
23 uses: pypa/gh-action-pypi-publish@master
24 with:
25 password: ${{ secrets.test_pypi_password }}
26 repository_url: https://test.pypi.org/legacy/
27 skip_existing: true
28 Documentation:
29 runs-on: ubuntu-latest
30 steps:
31 - name: Checkout
32 uses: actions/checkout@v2
33 with:
34 # Number of commits to fetch. 0 indicates all history.
35 # Default: 1
36 fetch-depth: 0
37 - uses: pdm-project/setup-pdm@main
38 name: Setup Python and PDM
39 with:
40 python-version: 3.9
41 - name: Install dependencies
42 run: make install
43 - name: Build the Documentation
44 run: make build-docs
45 - name: Deploy
46 uses: peaceiris/actions-gh-pages@v3
47 with:
48 deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
49 publish_dir: ./site