chore(deps): update dependency @vitejs/plugin-react to v4.3.3 #606
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
name: π Build and Deploy main | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: 'deploy-main' | |
cancel-in-progress: true | |
jobs: | |
build-distribution: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'π°οΈ Checkout source code' | |
uses: actions/checkout@v4 | |
- name: 'π°οΈ Setup Node' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@kaoto' | |
cache: 'yarn' | |
- name: 'π°οΈ Setup Java' | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: 'π§ Install dependencies' | |
run: yarn | |
# Build packages excluding @kaoto/camel-catalog since it was build during installing dependencies | |
- name: 'π§ Build packages' | |
run: | | |
yarn workspaces foreach --verbose --all --topological-dev --exclude @kaoto/camel-catalog run build | |
- name: 'π§ Tar UI Dist' | |
shell: bash | |
run: | | |
tar -czf ${{ runner.temp }}/kaoto-ui.tgz -C packages/ui/dist . | |
ls -lh ${{ runner.temp }}/kaoto-ui.tgz | |
- name: 'π§ Persist UI Dist' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: 'kaoto-ui-${{ github.run_id }}' | |
path: '${{ runner.temp }}/kaoto-ui.tgz' | |
retention-days: 1 | |
deploy-pages: | |
runs-on: ubuntu-latest | |
needs: | |
- build-distribution | |
steps: | |
- name: 'π°οΈ Checkout source code' | |
uses: actions/checkout@v4 | |
- name: 'π°οΈ Setup Pages' | |
uses: actions/configure-pages@v5 | |
- name: 'π°οΈ Download UI Dist' | |
uses: actions/download-artifact@v4 | |
with: | |
name: kaoto-ui-${{ github.run_id }} | |
path: '${{ runner.temp }}' | |
- name: 'π°οΈ Extract UI Dist' | |
shell: bash | |
run: | | |
mkdir -p packages/ui/dist | |
tar -xzf "${{ runner.temp }}/kaoto-ui.tgz" -C packages/ui/dist | |
- name: 'π€ Upload artifact @kaoto/kaoto web application' | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'packages/ui/dist' | |
- name: 'π Deploy to GitHub Pages' | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
deploy-images: | |
if: github.repository == 'KaotoIO/kaoto' | |
runs-on: ubuntu-latest | |
needs: | |
- build-distribution | |
steps: | |
- name: 'π°οΈ Checkout source code' | |
uses: actions/checkout@v4 | |
- name: 'π°οΈ Download UI Dist' | |
uses: actions/download-artifact@v4 | |
with: | |
name: kaoto-ui-${{ github.run_id }} | |
path: '${{ runner.temp }}' | |
- name: 'π°οΈ Extract UI Dist' | |
shell: bash | |
run: | | |
mkdir -p packages/ui/dist | |
tar -xzf "${{ runner.temp }}/kaoto-ui.tgz" -C packages/ui/dist | |
- name: 'π°οΈ Login to Container Registry' | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: 'π§ Build Container Image' | |
shell: bash | |
# TODO: the container image name should be configurable via vars/secrets | |
run: | | |
docker build -t "quay.io/kaotoio/kaoto-app:main" . | |
- name: 'π€ Upload Container Image' | |
shell: bash | |
run: | | |
docker push quay.io/kaotoio/kaoto-app:main |