-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
289 additions
and
62 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,45 @@ | ||
name: Deploy MkDocs to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
python-version: "3.10" | ||
|
||
jobs: | ||
deploy-docs: | ||
name: Deploy docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ env.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.python-version }} | ||
|
||
- name: Install poetry | ||
run: make download-poetry | ||
|
||
- name: Set up pip cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: venv-${{ env.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Set Poetry Path | ||
run: | | ||
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | ||
- name: Install requirements | ||
run: | | ||
poetry run pip install --upgrade pip | ||
poetry install --with docs | ||
- name: Deploying MkDocs documentation | ||
run: | | ||
poetry run mkdocs build | ||
poetry run mkdocs gh-deploy --force |
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 |
---|---|---|
|
@@ -6,9 +6,10 @@ | |
# 2. If it succeeds, the version is updated using Python Semantic Release | ||
# 3. The release is uploaded to GitHub (same step and GitHub action) | ||
# 5. Authentication to Google Cloud is achieved using Workload Identity Federation | ||
# 6. The release is uploaded to Google Cloud Storage | ||
# 6. The release is uploaded to Google Artifact Registry | ||
# | ||
# For more details on setting up Workload Identity Federation for GitHub, visit https://github.com/google-github-actions/auth#setting-up-workload-identity-federation | ||
# WIF service account must have roles/artifactregistry.write access to the Artifact Registry repository | ||
|
||
name: CI and Release on main | ||
|
||
|
@@ -46,12 +47,12 @@ jobs: | |
workload_identity_provider: '${{ secrets.WIF_PROVIDER }}' # e.g. - projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider | ||
service_account: '${{ secrets.WIF_SERVICE_ACCOUNT }}' # e.g. - [email protected] | ||
|
||
- name: Copy release to root | ||
run: cp -r dist/*.tar.gz . | ||
- name: Install twine | ||
run: pip install twine keyrings.google-artifactregistry-auth | ||
|
||
- name: 'Upload Release to Google Cloud Storage' | ||
uses: 'google-github-actions/upload-cloud-storage@v1' | ||
with: | ||
path: '.' | ||
destination: vertex-pipelines-deployer | ||
glob: '*.tar.gz' | ||
- name: Upload dist to Google Artifact Registry | ||
run: | | ||
python3 -m twine upload \ | ||
--repository-url https://europe-west1-python.pkg.dev/vertex-deployer-sandbox-3a8a/vertex-deployer \ | ||
--verbose \ | ||
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
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
Oops, something went wrong.