Skip to content

Deploy via jac-scale to the shared ALB #266

Deploy via jac-scale to the shared ALB

Deploy via jac-scale to the shared ALB #266

Workflow file for this run

name: Deploy jaseci-blogs with jac-scale
on:
push:
branches:
- main
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
deploy-jaseci-blogs:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.2.0
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::776241927220:role/GitHubActionsJaseciDeployRole
role-session-name: GitHubActions-JaseciBlogs
audience: sts.amazonaws.com
- name: Update kubeconfig for EKS
run: |
aws eks update-kubeconfig --region us-east-2 --name jaseci-cluster
kubectl config current-context
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Jac toolchain and project dependencies
run: |
pip install --upgrade pip
# jaclang core ships the `jac` CLI and is pip-installable. The Jac
# plugins (jac-scale, jac-client) no longer carry a pyproject.toml
# (jaseci-labs/jaseci#6322), so they install via `jac install`, which
# reads [dependencies] in jac.toml into the project's .jac/venv.
# `jac start` adds that venv to sys.path automatically.
pip install jaclang
jac install
- name: Deploy jaseci-blogs with jac-scale
working-directory: .
run: |
jac start main.jac --scale
- name: Verify deployment
run: |
echo "Checking deployment status..."
kubectl get deployments -n jaseci-blogs
kubectl get services -n jaseci-blogs
kubectl get pods -n jaseci-blogs
- name: Deployment Summary
if: always()
run: |
echo "## jaseci-blogs Deployment Summary" >> $GITHUB_STEP_SUMMARY
echo "### Configuration" >> $GITHUB_STEP_SUMMARY
echo "- **App Name**: jaseci-blogs" >> $GITHUB_STEP_SUMMARY
echo "- **Namespace**: jaseci-blogs" >> $GITHUB_STEP_SUMMARY
echo "- **Cluster**: jaseci-cluster" >> $GITHUB_STEP_SUMMARY
echo "- **Region**: us-east-2" >> $GITHUB_STEP_SUMMARY
echo "- **Triggered By**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Deployment Status" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
kubectl get all -n jaseci-blogs 2>&1 >> $GITHUB_STEP_SUMMARY || echo "Unable to fetch deployment status" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY