Skip to content

Commit

Permalink
ci: add docs deploy job and release job
Browse files Browse the repository at this point in the history
  • Loading branch information
RDWimmers committed Oct 10, 2024
1 parent 6c1580a commit 74fa642
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 72 deletions.
60 changes: 33 additions & 27 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
# name: deploy docs
name: deploy docs

# on:
# push:
# branches:
# - main
on:
push:
branches:
- main

# jobs:
# deploy_docs:
# name: Deploy docs
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
permissions: read-all

# - name: Install python 3.9
# uses: actions/setup-python@v4
# with:
# python-version: 3.9
jobs:
deploy_docs:
name: Deploy docs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip setuptools
# pip install -r requirements.txt
# pip install .
- name: Install python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"

# - name: Build docs
# run: sphinx-build -b html docs public
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install .
# - name: Publish docs
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./public
- name: Build docs
run: sphinx-build -b html docs public
env:
NUCLEI_TOKEN: ${{ secrets.NUCLEI_TOKEN }}
BASETIME_ACCESS_KEY: ${{ secrets.BASETIME_ACCESS_KEY }}
BASETIME_KEY_ID: ${{ secrets.BASETIME_KEY_ID }}

- name: Publish docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
30 changes: 15 additions & 15 deletions .github/workflows/lint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ jobs:
BASETIME_ACCESS_KEY: ${{ secrets.BASETIME_ACCESS_KEY }}
BASETIME_KEY_ID: ${{ secrets.BASETIME_KEY_ID }}

# - name: Post coverage results
# uses: coverallsapp/github-action@v2
# with:
# flag-name: run-${{ matrix.python-version }}
# parallel: true

# finish:
# needs: test
# if: ${{ always() }}
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: coverallsapp/github-action@v2
# with:
# parallel-finished: true
- name: Post coverage results
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ matrix.python-version }}
parallel: true

finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true

lint:
name: Formatting check
Expand Down
62 changes: 32 additions & 30 deletions .github/workflows/release_pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
# name: Release
name: Release

# on:
# push:
# tags: ['*']
on:
push:
tags: ["*"]

# jobs:
# deploy:
# runs-on: ubuntu-latest
permissions: read-all

# environment:
# name: release
jobs:
deploy:
runs-on: ubuntu-latest

# # Mandatory permission for trusted publishing to PyPi
# permissions:
# id-token: write
environment:
name: release

# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.11"
# Mandatory permission for trusted publishing to PyPi
permissions:
id-token: write

# - name: Install dependencies
# run: |
# pip install setuptools build
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

# - name: Build a binary wheel and a source tarball
# run: python3 -m build
- name: Install dependencies
run: |
pip install setuptools build
# - name: Store the distribution packages
# uses: actions/upload-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
- name: Build a binary wheel and a source tarball
run: python3 -m build

# - name: Publish distribution 📦 to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 74fa642

Please sign in to comment.