Skip to content

Set type=button on cancel buttons #250

Set type=button on cancel buttons

Set type=button on cancel buttons #250

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
- podman-deploy-backend
# pull_request:
# types: [ opened, synchronize, reopened ]
env:
TAG: ${{ github.head_ref || github.ref_name }}-${{ github.run_number }}
jobs:
build-deploy-azure-static-site:
runs-on: ubuntu-latest
name: Build and deploy static site
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: gradle jsBrowserProductionLibraryDistribution
working-directory: webtool/gradle/common
run: gradle jsBrowserProductionLibraryDistribution
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: ./webtool/frontend/package-lock.json
- run: npm install
working-directory: ./webtool/frontend
- run: npm run build
working-directory: ./webtool/frontend
env:
VITE_BACKEND_URL: https://local4local-backend.zenmo.com
VITE_ANYLOGIC_CALLBACK_URL: https://local4local-backend.zenmo.com
- name: Copy Azure settings
run: cp webtool/frontend/staticwebapp.config.json webtool/frontend/dist/.
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_DEPLOY_TOKEN }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
# We build in previous steps, because a build failure at this step doesn't block the deploy.
skip_app_build: true
app_location: "/webtool/frontend/dist"
api_location: "" # Api source code path - optional
###### End of Repository/Build Configurations ######
build-backend-container:
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@main
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ghcr.io/zenmo/coco-backend:${{ env.TAG }}
context: ./webtool/gradle
file: ./webtool/deploy/backend/Dockerfile
build-frontend-container:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Log in to GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Build container image
run: ./webtool/deploy/frontend/build.sh
- name: Push container image
run: ./webtool/deploy/frontend/push.sh
deploy-podhost:
runs-on: ubuntu-24.04
needs:
- build-frontend-container
- build-backend-container
steps:
- uses: actions/checkout@v5
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PODHOST_SSH_PRIVATE_KEY }}
known_hosts: podhost.zenmo.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKVeen0rfyMwiAoQCpIUJ/a2tpM35D/BdEDUyfRTxiXm
- name: Deploy podhost
run: ./webtool/deploy/quadlets/deploy.sh