Skip to content

define sample apps in sample app json to be used by the console #18

define sample apps in sample app json to be used by the console

define sample apps in sample app json to be used by the console #18

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
# Specify to ensure "pipefail and errexit" are set.
# Ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell
shell: bash
permissions:
contents: read
id-token: write # Required for OIDC authentication
deployments: write
jobs:
setup:
runs-on: ubuntu-latest
outputs:
app-list-json: ${{ steps.read-json.outputs.APP_LIST }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read JSON
id: read-json
run: |
delimiter="$(openssl rand -hex 8)"
{
echo "APP_LIST<<${delimiter}"
sed -e '$a\' console-sample-apps.json # Ensures that an empty line is always present.
echo "${delimiter}"
} >> "$GITHUB_OUTPUT"
create-zip:
runs-on: ubuntu-latest
needs:
- setup
strategy:
fail-fast: false
matrix:
app: ${{ fromJSON(needs.setup.outputs.app-list-json) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create artifact
### TODO THIS IS JUST FOR TEST
if: ${{ matrix.app.name == 'album-recommendation' || matrix.app.name == 'text-search' }}
### TODO THIS IS JUST FOR TEST
env:
DEBUG: ${{ runner.debug }} # Automatically set by GitHub Actions when running in debug mode.
run: |
./scripts/build-sample-app.sh "${{ matrix.app.name }}"
- name: Upload artifact
### TODO THIS IS JUST FOR TEST
if: ${{ matrix.app.name == 'album-recommendation' || matrix.app.name == 'text-search' }}
### TODO THIS IS JUST FOR TEST
uses: actions/upload-artifact@v4
with:
name: sample-app-${{ matrix.app.name }}
path: ${{ matrix.app.name }}/dist/
deploy-json:
runs-on: ubuntu-latest
environment:
name: Vespa Cloud
url: https://cloud.vespa.ai
needs:
- create-zip
steps:
- name: Download All Packages
uses: actions/download-artifact@v4
- name: List
run: |
ls -l applications