forked from kedro-org/kedro-viz
-
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.
Merge branch 'main' of https://github.com/jitu5/kedro-viz
- Loading branch information
Showing
3 changed files
with
113 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
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,41 @@ | ||
name: Deploy demo | ||
# Builds a Docker image of the demo project, pushes it to | ||
# AWS ECR, and deploys it to AWS Lightsail. | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- demo | ||
jobs: | ||
deploy_demo: | ||
runs-on: ubuntu-latest | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
run: |- | ||
cd demo-project | ||
echo "AWS_ECR_URL=public.ecr.aws/h1b3x4b6/jitu5-kedro-viz" >> $GITHUB_ENV | ||
echo "KEDRO_VIZ_VERSION=$(cat .version)" >> $GITHUB_ENV | ||
- name: Install AWS CLI | ||
run: pip3 install awscli | ||
|
||
- name: Build demo container image | ||
run: |- | ||
cd demo-project | ||
echo "kedro_viz==$KEDRO_VIZ_VERSION" >> src/docker_requirements.txt | ||
docker build -t $AWS_ECR_URL:$KEDRO_VIZ_VERSION . | ||
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws | ||
docker push $AWS_ECR_URL:$KEDRO_VIZ_VERSION | ||
- name: Create a new lightsail deployment | ||
run: |- | ||
cd demo-project | ||
# run https://docs.aws.amazon.com/cli/latest/reference/lightsail/create-container-service-deployment.html#create-container-service-deployment | ||
aws lightsail create-container-service-deployment --region eu-west-2 --cli-input-json file://./lightsail.json |
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,59 @@ | ||
name: Release to NPM and PyPI | ||
# Builds and releases the application to NPM and PyPI | ||
# when a new release is published or the workflow is manually triggered. | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
env: | ||
# AWS_REGION: xxxxst-2 | ||
# CACHE_VERSION: xxxx | ||
# SNYK_TOKEN: xxxxa727 | ||
TWINE_NON_INTERACTIVE: true | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
TWINE_REPOSITORY_URL: ${{ secrets.TWINE_REPOSITORY_URL }} | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
jobs: | ||
release_to_npm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.20.0 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install Node dependencies | ||
run: npm install | ||
|
||
- name: Build React application | ||
run: |- | ||
node -v | ||
make build | ||
- name: Publish to npm | ||
run: npm publish --access=public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
release_to_pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Tests | ||
uses: "./.github/actions/setup_tests" | ||
|
||
- name: Make Python package | ||
run: make package | ||
|
||
- name: Install twine | ||
run: python -m pip install -U twine | ||
|
||
- name: Publish to PyPI | ||
run: python -m twine upload package/dist/* |