diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 188be8f..19d7c46 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -22,10 +22,16 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout source code + uses: actions/checkout@v4 + - name: Build and push the Docker image uses: docker/build-push-action@v6 with: + context: . push: true + build-args: | + PUBLIC_API_URL=https://opt-api.osdci.net tags: | ghcr.io/project-optima/ttscm-ui:latest ghcr.io/project-optima/ttscm-ui:${{ github.event.release.tag_name }} @@ -47,6 +53,8 @@ jobs: - name: Build macOS distributables run: bun run make:macos + env: + PUBLIC_API_URL: https://opt-api.osdci.net - name: Upload macOS artifacts to release uses: softprops/action-gh-release@v2 @@ -72,6 +80,8 @@ jobs: - name: Build Windows distributables run: bun run make -- --platform win32 + env: + PUBLIC_API_URL: https://opt-api.osdci.net - name: Upload Windows artifacts to release uses: softprops/action-gh-release@v2 diff --git a/Dockerfile b/Dockerfile index 493273a..738f882 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,10 @@ RUN bun install --frozen-lockfile # Build the SvelteKit app with adapter-node COPY . . + +ARG PUBLIC_API_URL=https://opt-api.osdci.net +ENV PUBLIC_API_URL=$PUBLIC_API_URL + RUN bun run build:server # Production image