Skip to content

Commit

Permalink
Minor maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaczero committed Oct 29, 2024
1 parent c035154 commit bd02dbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bd02dbf

Please sign in to comment.