diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..6747e85 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,111 @@ +name: Loama CD + +on: + push: + branches: [ "root" ] + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + controller-build: + name: 'Controller Build' + runs-on: ubuntu-latest + defaults: + run: + working-directory: controller + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Node.js + uses: actions/setup-node@v4 + - uses: pnpm/action-setup@v4 + name: Install PNPM + with: + version: latest + run_install: false + - name: Get pnpm store directory + shell: bash + id: cache + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + - uses: actions/cache@v4 + name: Setup PNPM cache + env: + STORE_PATH: ${{ steps.cache.outputs.STORE_PATH }} + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Insall dependencies + run: pnpm install --frozen-lockfile + - name: Run Typescript Check + run: pnpm run build >> $GITHUB_STEP_SUMMARY + - name: Save distribution files + uses: actions/upload-artifact@v4 + with: + name: controller-dist + path: ${{github.workspace}}/controller/dist + + build: + name: 'Deploy App' + runs-on: ubuntu-latest + needs: controller-build + defaults: + run: + working-directory: loama + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download controller dist + uses: actions/download-artifact@v4 + with: + name: controller-dist + path: ${{github.workspace}}/controller/dist + - name: Install Node.js + uses: actions/setup-node@v4 + - uses: pnpm/action-setup@v4 + name: Install PNPM + with: + version: latest + run_install: false + - name: Get pnpm store directory + shell: bash + id: cache + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT + - uses: actions/cache@v4 + name: Setup PNPM cache + env: + STORE_PATH: ${{ steps.cache.outputs.STORE_PATH }} + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: Install dependencies of controller + working-directory: controller + run: pnpm install --frozen-lockfile + - name: Install dependencies of loama + run: pnpm install --frozen-lockfile + - name: Build applicaion + run: pnpm run build + - name: 'Dup `index.html` to `404.html` for redirects' + run: cp dist/index.html dist/404.html + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload dist folder + path: ${{github.workspace}}/loama/dist + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 139c571..ce339c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,4 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# ESLint is a tool for identifying and reporting on patterns -# found in ECMAScript/JavaScript code. -# More details at https://github.com/eslint/eslint -# and https://eslint.org - -name: AMA ESLint +name: Loama CI on: push: diff --git a/loama/src/assets/loama.svg b/loama/public/loama.svg similarity index 100% rename from loama/src/assets/loama.svg rename to loama/public/loama.svg diff --git a/loama/src/assets/vault.svg b/loama/public/vault.svg similarity index 100% rename from loama/src/assets/vault.svg rename to loama/public/vault.svg diff --git a/loama/src/components/LoginForm.vue b/loama/src/components/LoginForm.vue index 94c0fba..760dac4 100644 --- a/loama/src/components/LoginForm.vue +++ b/loama/src/components/LoginForm.vue @@ -52,7 +52,7 @@ const login = () => { store.session.login({ oidcIssuer: issuer, - redirectUrl: new URL('/home/', window.location.href).toString(), + redirectUrl: new URL(`${import.meta.env.BASE_URL}home/`, window.location.href).toString(), clientName: 'LOAMA', }) .then(() => { diff --git a/loama/src/components/explorer/ResourceExplorer.vue b/loama/src/components/explorer/ResourceExplorer.vue index 2a9c42a..d1bd860 100644 --- a/loama/src/components/explorer/ResourceExplorer.vue +++ b/loama/src/components/explorer/ResourceExplorer.vue @@ -7,7 +7,7 @@
- + No folder or file selected! Select one to get started
@@ -15,7 +15,6 @@