Skip to content

Commit d4fec0b

Browse files
authored
Revert "Blogbuildtime"
1 parent ac83374 commit d4fec0b

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

.github/workflows/blog.yaml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,41 @@ jobs:
1515
defaults:
1616
run:
1717
shell: bash -l {0}
18+
env:
19+
RETICULATE_PYTHON: /usr/share/miniconda3/envs/www-main/bin/python
1820
steps:
1921
- uses: actions/checkout@v3
2022
with:
23+
# submodules: true # Fetch Hugo themes (true OR recursive)
2124
fetch-depth: 3
22-
- uses: mamba-org/provision-with-micromamba@v15
25+
- uses: conda-incubator/setup-miniconda@v2
2326
with:
24-
environment-file: environment.yml
25-
micromamba-version: latest
27+
python-version: 3.9
28+
activate-environment: www-main
29+
miniforge-variant: Mambaforge
30+
miniforge-version: latest
31+
use-mamba: true
32+
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
2633
- name: Get Date
2734
id: get-date
2835
run: echo "name=today::$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
2936
shell: bash
30-
- name: Create environment
31-
run: micromamba env create -n www-main-micromamba -f environment.yml
32-
- name: micromamba info
37+
- name: Cache Conda env
38+
uses: actions/cache@v3
39+
with:
40+
path: ${{ env.CONDA }}/envs
41+
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }}
42+
env:
43+
# Increase this value to reset cache if etc/example-environment.yml has not changed
44+
CACHE_NUMBER: 0
45+
id: cache
46+
- name: Update environment
47+
run: mamba env update -n www-main -f environment.yml
48+
if: steps.cache.outputs.cache-hit != 'true'
49+
- name: Conda info
3350
run: |
34-
micromamba info
35-
micromamba list
51+
conda info
52+
conda list
3653
- name: Install R dependencies
3754
env:
3855
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)