diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 506198a..65e10c9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@v30 with: nix_path: nixpkgs=channel:nixpkgs-24.05-darwin @@ -51,30 +51,25 @@ jobs: ~/.cache/uv .venv - - name: Install dependencies + - name: Build container image run: | - nix-shell --pure --run true - nix-shell --pure --arg isDevelopment false --run true + echo "IMAGE_PATH=$(nix-build --no-out-link)" >> $GITHUB_ENV - name: Export Nix store cache if: steps.nix-cache.outputs.cache-hit != 'true' run: | nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nix-cache - - name: Build container image - run: | - echo "IMAGE_PATH=$(nix-build --no-out-link)" >> $GITHUB_ENV - - name: Configure SSH run: | mkdir -p ~/.ssh - echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id && chmod 600 ~/.ssh/id echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts echo "Host remote HostName ${{ secrets.SSH_HOST }} User ${{ secrets.SSH_USER }} Port ${{ secrets.SSH_PORT }} - IdentityFile ~/.ssh/id_rsa + IdentityFile ~/.ssh/id " > ~/.ssh/config - name: Upload container image diff --git a/shell.nix b/shell.nix index 669552c..d6eeeac 100644 --- a/shell.nix +++ b/shell.nix @@ -137,7 +137,8 @@ let [ "$current_python" != "${python'}" ] && rm -rf .venv/ echo "Installing Python dependencies" - echo "${python'}/bin/python" > .python-version + export UV_COMPILE_BYTECODE=1 + export UV_PYTHON="${python'}/bin/python" uv sync --frozen echo "Activating Python virtual environment"