Skip to content

Commit ed1814c

Browse files
committed
Use directory name as mamba environment name
1 parent 384cd74 commit ed1814c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ jobs:
2929
# Install micromamba.
3030
wget -qO- https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
3131
32-
3332
# Install Poetry.
3433
pipx install poetry~=1.8
3534
3635
# Create Mamba environment.
37-
export MAMBA_ROOT_PREFIX=~/micromamba
3836
eval "$(./bin/micromamba shell hook -s posix)"
39-
micromamba create --file environment.yml --yes
40-
micromamba activate brodie.id.au
37+
export MAMBA_ROOT_PREFIX=~/micromamba
38+
./bin/micromamba create --file environment.yml --yes
39+
./bin/micromamba activate "${PWD##*/}" # If dir name == environment name...
4140
4241
# Install Python package dependencies.
4342
poetry install
@@ -46,9 +45,8 @@ jobs:
4645
role-to-assume: arn:aws:iam::961672313229:role/Account-GithubOidcRole20798CD3-LZP3AHTIPJU2
4746
aws-region: ap-southeast-2
4847
- run: |
49-
export MAMBA_ROOT_PREFIX=~/micromamba
5048
eval "$(./bin/micromamba shell hook -s posix)"
51-
micromamba activate brodie.id.au
49+
MAMBA_ROOT_PREFIX=~/micromamba ./bin/micromamba activate "${PWD##*/}"
5250
5351
# Set timezone so that Sphinx uses local dates.
5452
sudo timedatectl set-timezone Australia/Queensland

0 commit comments

Comments
 (0)