Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/disabled/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "GitHub Pages"

on:
release:
types: [published]
# workflow_dispatch:
# environment:
# type: choice
# description: Choose Environment
# options:
# - testpypi
# - pypi
push:

env:
ENVIRONMENT: "testpypi"
REPOSITORY: "https://test.pypi.org/legacy/"

jobs:
publish:
name: "Publish"
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event_name == 'release' && !github.event.release.prerelease

permissions:
id-token: write

environment:
name: ${{ env.ENVIRONMENT }}
url: https://pypi.org/project/vultr-python/

steps:
- name: "PyPi Publish"
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: ${{ env.REPOSITORY }}
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Build"

on:
workflow_dispatch:
release:
types: [published]
pull_request:
branches: ["master"]

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: "Checkout"
uses: actions/checkout@v3

- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: "Build"
run: |
python -m pip install -U pip
python -m pip install -U build
python -m build

- name: "Upload Artifact"
uses: actions/upload-artifact@v3
with:
name: vultr-python
path: dist/
66 changes: 66 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "GitHub Pages"

on:
push:
branches: ["master"]
workflow_dispatch:
repository_dispatch:
types:
- webhook

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: "Checkout"
uses: actions/checkout@v3

- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: "Build Docs"
run: |
python -m pip install -U pip
python -m pip install -U pdoc
python -m pip install -Ur requirements.txt
python -m pdoc -o _site vultr.py

- name: "Update Permissions"
run: |
chmod -c -R +rX "_site/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done

- name: "Upload Pages Artifact"
uses: actions/upload-pages-artifact@v2
with:
path: _site/

deploy:
name: "Deploy"
runs-on: ubuntu-latest
timeout-minutes: 5
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: "Configure Pages"
uses: actions/configure-pages@v3

- name: "Deploy Pages"
id: deployment
uses: actions/deploy-pages@v2
with:
artifact_name: github-pages
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.idea/
*.iml
.vscode/
dist/
_site/
venv/
**/__pycache__/
*.egg-info/
venv/
dist/
.coverage
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Python 3 wrapper for the Vultr API v2.

* Vultr: [https://www.vultr.com](https://www.vultr.com/?ref=6905748)
* Vultr API: [https://www.vultr.com/api](https://www.vultr.com/api/?ref=6905748)
* Vultr Python Docs: [https://vultr-python.sapps.me](https://vultr-python.sapps.me/)
* Vultr Python Docs: [https://cssnr.github.io/vultr-python](https://cssnr.github.io/vultr-python)

This is currently a WIP and not complete, but has some useful functions.
Feel free to request additional functions and more on [Discord](https://discord.gg/wXy6m2X8wY).
Expand Down Expand Up @@ -70,7 +70,7 @@ data = {
instance = vultr.create_instance(**data)
```

View all functions at the Doc site: [https://vultr-python.sapps.me](https://vultr-python.sapps.me/)
View all functions at the Doc site: [https://cssnr.github.io/vultr-python](https://cssnr.github.io/vultr-python)

View the full API documentation at Vultr: [https://www.vultr.com/api](https://www.vultr.com/api/?ref=6905748)

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
requests
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
zip_safe=False,
platforms='any',
project_urls={
'Documentation': 'https://vultr-python.sapps.me/',
'Documentation': 'https://cssnr.github.io/vultr-python',
'Source': 'https://github.com/cssnr/vultr-python',
},
classifiers=[
Expand Down