Complete Replacement of CX-Oracle for OracleDB #48
Workflow file for this run
This file contains hidden or 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
name: Upload Python Package | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools build twine | |
- name: Build and publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python -m build | |
twine upload dist/* | |
build: | |
name: Deploy docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Generate changelog | |
run: python3 scripts/changelog.py | |
- name: Build MkDocs site | |
run: mkdocs build | |
- name: Copy README to docs/index.md | |
run: cp README.md docs/index.md | |
- name: Copy CONTRIBUTING to docs/contribute.md | |
run: cp CONTRIBUTING.md docs/contribute.md | |
- name: Copy CHANGELOG to docs/release-notes.md | |
run: cp CHANGELOG.md docs/release-notes.md | |
- name: Configure git | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Stash changes | |
run: git stash --include-untracked | |
- name: Pull latest gh-pages | |
run: | | |
git fetch origin gh-pages | |
git checkout gh-pages | |
git pull origin gh-pages | |
git checkout - | |
- name: Apply stash | |
run: git stash pop | |
- name: Deploy to GitHub Pages | |
run: mkdocs gh-deploy --force | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |