Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gh pages workflow #104

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/deploy-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Deploy to GH pages
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: "pages"
cancel-in-progress: true

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: '@kaoto'
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: 🛰️ Setup Pages
uses: actions/configure-pages@v3
- name: 🔧 Install dependencies
run: yarn
- name: Build @kaoto-next/ui web application
run: yarn workspace @kaoto-next/ui run build
- name: 📤 Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'packages/ui/dist/webapp'
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions packages/ui/vite.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig({
sourcemap: true,
emptyOutDir: true,
},
base: './',
});

/**
Expand Down