-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add docs deploy job and release job
- Loading branch information
Showing
3 changed files
with
80 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |