diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..d697b10 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,46 @@ +name: gh-pages +on: + push: + branches: + - main +permissions: + contents: write + +env: + UV_VERSION: 0.6.17 + +jobs: + build: + runs-on: ubuntu-latest + env: + PYTHON_VERSION: '3.12' + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ env.PYTHON_VERSION}} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION}} + + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + version: ${{ env.UV_VERSION }} + + - name: Install Dependencies + run: uv sync --locked --all-packages + + - name: mkdocs build + shell: bash + run: uv run poe build_docs + + - name: List Docsite Contents + run: find site + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4.6.4 + with: + branch: gh-pages + folder: site + clean: true \ No newline at end of file diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..a7e24ac --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,49 @@ +name: Python-Publish-CI +on: + release: + types: + - created + push: + tags: + - "release/*" # match version tags like release/1.0.0 + +env: + UV_VERSION: 0.6.17 + PYTHON_VERSION: 3.12 + +jobs: + publish: + name: Upload python projects to PyPI + runs-on: ubuntu-latest + + environment: + name: pypi + url: https://pypi.org/p/benchmark-qed + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: '${{ env.PYTHON_VERSION }}' + + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + version: ${{ env.UV_VERSION }} + + - name: Build Distributable + shell: bash + run: uv build + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true + verbose: true + \ No newline at end of file diff --git a/.gitignore b/.gitignore index e68bbbc..16e6e9a 100644 --- a/.gitignore +++ b/.gitignore @@ -178,8 +178,3 @@ cython_debug/ # PyPI configuration file .pypirc - - -## workflows -.github/workflows/gh-pages.yml -.github/workflows/python-publish.yml \ No newline at end of file