diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 11e6d6f..80d5947 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,48 +31,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Detect package manager - id: detect-package-manager + - name: Build run: | - if [ -f "${{ github.workspace }}/yarn.lock" ]; then - echo "manager=yarn" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - echo "runner=yarn" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/package.json" ]; then - echo "manager=npm" >> $GITHUB_OUTPUT - echo "command=ci" >> $GITHUB_OUTPUT - echo "runner=npx --no-install" >> $GITHUB_OUTPUT - exit 0 - else - echo "Unable to determine package manager" - exit 1 - fi - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version: "lts/*" - cache: ${{ steps.detect-package-manager.outputs.manager }} - - name: Setup Pages - uses: actions/configure-pages@v3 - - name: Restore cache - uses: actions/cache@v3 - with: - path: | - .next/cache - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- - - name: Install dependencies - run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - - name: Build with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next build + ./nx run --output-style=stream-without-prefixes editor:install + ./nx run --output-style=stream-without-prefixes editor:build - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: - path: ./out + path: ./editor/out # Deployment job deploy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 996ecaa..14edcd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v4 - name: Build Server - run: cargo build --release --manifest-path=local_server/Cargo.toml + run: ./nx build local_server - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 diff --git a/local_server/project.json b/local_server/project.json index baa8107..4ef1827 100644 --- a/local_server/project.json +++ b/local_server/project.json @@ -8,7 +8,7 @@ "options": { "cwd": "local_server", "commands": [ - "cargo build" + "cargo build --release" ] } },