Skip to content

Commit 0a27766

Browse files
committed
fix from before
1 parent afd7cf2 commit 0a27766

File tree

1 file changed

+9
-47
lines changed

1 file changed

+9
-47
lines changed

.github/workflows/blog.yaml

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: blog
2-
32
on:
43
push:
54
paths: # run only when an Rmd file changes
@@ -8,48 +7,30 @@ on:
87
- "dependencies.R"
98
- ".github/workflows/blog.yaml"
109
workflow_dispatch:
11-
1210
jobs:
1311
blog:
1412
runs-on: ubuntu-latest
1513
defaults:
1614
run:
1715
shell: bash -l {0}
18-
env:
19-
RETICULATE_PYTHON: /usr/share/miniconda3/envs/www-main/bin/python
2016
steps:
2117
- uses: actions/checkout@v3
2218
with:
23-
# submodules: true # Fetch Hugo themes (true OR recursive)
2419
fetch-depth: 3
25-
- uses: conda-incubator/setup-miniconda@v2
20+
- uses: mamba-org/provision-with-micromamba@v15
2621
with:
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!
22+
environment-file: environment.yml
23+
micromamba-version: latest
3324
- name: Get Date
3425
id: get-date
3526
run: echo "name=today::$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
3627
shell: bash
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
28+
- name: Create environment
29+
run: micromamba env create -n www-main-micromamba -f environment.yml
30+
- name: micromamba info
5031
run: |
51-
conda info
52-
conda list
32+
micromamba info
33+
micromamba list
5334
- name: Install R dependencies
5435
env:
5536
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -72,23 +53,4 @@ jobs:
7253
name: blog
7354
path: |
7455
./content/blog
75-
./static/blog
76-
77-
- uses: actions/setup-node@v3
78-
with:
79-
node-version: 16
80-
- uses: actions/[email protected]
81-
with:
82-
path: ~/.npm
83-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
84-
restore-keys: |
85-
${{ runner.os }}-node-
86-
- run: npm ci
87-
- name: Lint
88-
run: npm run lint
89-
- name: Build
90-
run: npm run build
91-
- uses: actions/upload-artifact@v3
92-
with:
93-
name: website
94-
path: ./public
56+
./static/blog

0 commit comments

Comments
 (0)