diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 803ad6f..09a0c3e 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -22,11 +22,16 @@ concurrency: cancel-in-progress: false jobs: + #build vue app build: + environment: + name: github-pages runs-on: ubuntu-latest env: - BASE_URL: ${{ secrets.S_BASE_URL }} + S_BASE_URL: ${{ secrets.S_BASE_URL }} + E_BASE_URL: ${{ vars.BASE_URL }} + L_BASE_URL: /2024-Spring/ steps: - name: Checkout uses: actions/checkout@v2 @@ -43,6 +48,9 @@ jobs: run: npm run build working-directory: ./client + - name: Echo + run: echo "S_BASE_URL=$S_BASE_URL E_BASE_URL=$E_BASE_URL L_BASE_URL=$L_BASE_URL" + - name: Archive production artifacts uses: actions/upload-artifact@v2 with: diff --git a/client/src/router/index.ts b/client/src/router/index.ts index 297c845..400c02a 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -2,6 +2,11 @@ import { createRouter, createWebHistory } from 'vue-router' import { routes } from 'vue-router/auto-routes' console.log(`import.meta.env.BASE_URL: ${import.meta.env.BASE_URL}`) +console.log(`import.meta.env.S_BASE_URL: ${import.meta.env.S_BASE_URL}`) +console.log(`import.meta.env.E_BASE_URL: ${import.meta.env.E_BASE_URL}`) +console.log(`import.meta.env.L_BASE_URL: ${import.meta.env.L_BASE_URL}`) +console.log(`import.meta.env.VITE_BASE_URL: ${import.meta.env.VITE_BASE_URL}`) + const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: routes