-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Docs and Build
- Loading branch information
Showing
7 changed files
with
146 additions
and
5 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 |
---|---|---|
@@ -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 }} |
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 |
---|---|---|
@@ -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/ |
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 |
---|---|---|
@@ -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 |
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,7 +1,9 @@ | ||
.idea/ | ||
*.iml | ||
.vscode/ | ||
dist/ | ||
_site/ | ||
venv/ | ||
**/__pycache__/ | ||
*.egg-info/ | ||
venv/ | ||
dist/ | ||
.coverage |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
requests |
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