Skip to content

Commit

Permalink
Add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
waylan committed Dec 29, 2023
1 parent 2a7696f commit b01868b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: deploy

on:
push:
tags:
- '*'

jobs:

pypi:
name: upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mkdocs-bootstrap
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build
run: |
python -m build
- name: Publish to PyPI
if: success()
uses: pypa/gh-action-pypi-publish@v1

ghpages:
name: upload documentation to Github Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install .
- name: Publish to GitHub Pages
if: success()
run: |
python -m mkdocs gh-deploy --clean --verbose
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist/
build/
mkdocs_bootstrap.egg-info/
site/
venv/
4 changes: 0 additions & 4 deletions deploy-release.sh

This file was deleted.

0 comments on commit b01868b

Please sign in to comment.