diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d2cc090..da64295 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - publish-gpr: + test-and-deploy: runs-on: ubuntu-latest permissions: contents: read @@ -18,7 +18,9 @@ jobs: with: node-version: 20 - run: npm ci - - run: node sync.mjs + - run: | + printenv + node sync.mjs env: AIDBOX_URL: ${{ vars.AIDBOX_STAGE_URL }} AIDBOX_USER: ${{ vars.AIDBOX_STAGE_USERNAME }} diff --git a/sync.mjs b/sync.mjs index 4e03bac..27d8a0a 100644 --- a/sync.mjs +++ b/sync.mjs @@ -49,7 +49,7 @@ function getContentTypeByExt(ext) { function buildOperationResource(filepath) { const [_, ...splited] = filepath.split(/[\/\._]/); const method = splited.slice(-2)[0]; - console.log(filepath); + const route = splited.slice(0, -2).map(route_path => { if (route_path[0] === ':') return { name: route_path.slice(1) } @@ -106,7 +106,6 @@ async function getSeedImport(client) { '/SeedImport/aidbox-ui'); return resp.data.resources; } catch (e) { - console.log(e); if (e.response.status === 404) return [] else