Skip to content

Commit

Permalink
try producing action artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Frizi committed Oct 16, 2024
1 parent 3e5ee64 commit 8cb3164
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/bazel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ jobs:
ENSO_CLOUD_STRIPE_KEY: ${{ vars.ENSO_CLOUD_STRIPE_KEY }}
VITE_ENSO_AG_GRID_LICENSE_KEY: ${{ vars.ENSO_AG_GRID_LICENSE_KEY }}
VITE_ENSO_MAPBOX_API_TOKEN: ${{ vars.ENSO_MAPBOX_API_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# permissions:
# actions: write
- name: Get build output location
run: |
OUTPUT_SYMLINK=$(bazel cquery --output=files //app/gui:dist)
BAZEL_OUTPUT=$(readlink -f "$OUTPUT_SYMLINK")
echo "BAZEL_OUTPUT=$BAZEL_OUTPUT" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: gui-static
path: ${{ env.BAZEL_OUTPUT }}
if-no-files-found: error
4 changes: 2 additions & 2 deletions app/common/src/appConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as url from 'node:url'
// === readEnvironmentFromFile ===
// ===============================

const PATH_TO_REPO_ROOT = url.fileURLToPath(new URL('../../../..', import.meta.url))
const PATH_TO_ENV_FILE_DIR = url.fileURLToPath(new URL('../../ide-desktop/', import.meta.url))

/**
* Read environment variables from a file based on the `ENSO_CLOUD_ENVIRONMENT`
Expand All @@ -18,7 +18,7 @@ export async function readEnvironmentFromFile() {
const environment = process.env.ENSO_CLOUD_ENVIRONMENT ?? null
const isProduction = environment == null || environment === '' || environment === 'production'
const fileName = isProduction ? '.env' : `.${environment}.env`
const filePath = path.join(PATH_TO_REPO_ROOT, fileName)
const filePath = path.join(PATH_TO_ENV_FILE_DIR, fileName)
if (process.env.TRY_LOAD_ENV_FILE !== 'false') {
try {
const file = await fs.readFile(filePath, { encoding: 'utf-8' })
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"name": "root",
"scripts": {
"dev:gui": "corepack pnpm run --parallel -r --filter enso-gui --filter ydoc-server-nodejs --aggregate-output /^^^^dev:/",
"build:gui": "corepack pnpm run -r --filter enso-gui build",
"compile": "corepack pnpm run -r compile",
"build:gui": "corepack pnpm run -r compile && corepack pnpm run -r --filter enso-gui build",
"build:ide": "corepack pnpm run -r compile && corepack pnpm run -r --filter enso build",
"build:icons": "corepack pnpm run -r --filter enso-icons build",
"dist:ide": "corepack pnpm run -r --filter enso dist",
Expand Down

0 comments on commit 8cb3164

Please sign in to comment.