Skip to content

Commit c4fb1de

Browse files
authored
Merge branch 'devel' into update/dynamic-url
2 parents 7a50c45 + ca04bf3 commit c4fb1de

File tree

8 files changed

+47
-31
lines changed

8 files changed

+47
-31
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"customizations": {
88
"vscode": {
99
"settings": {
10+
"editor.tabSize": 8,
11+
"editor.indentSize": 4,
12+
"editor.detectIndentation": false,
1013
"r.lsp.diagnostics": false,
1114
"r.plot.useHttpgd": true,
1215
"r.rpath.linux": "/usr/bin/R",

.github/workflows/build-and-publish-image.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,20 @@ on:
1616
- 'reinstall-cmake.sh'
1717
- 'VERSION'
1818

19+
permissions:
20+
contents: read
21+
packages: write
1922

2023
env:
2124
REGISTRY: ghcr.io
2225
IMAGE_NAME: ${{ github.repository }}
2326

2427
jobs:
2528
build-and-push-image:
26-
if: ${{github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true}}
29+
if: |
30+
github.event_name == 'workflow_dispatch' ||
31+
(github.event_name == 'pull_request' && github.event.pull_request.merged == true)
2732
runs-on: ubuntu-latest
28-
permissions:
29-
contents: read
30-
packages: write
3133

3234
steps:
3335
- name: Checkout repository

.github/workflows/build-gitpod-image.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ on:
1717
- 'reinstall-cmake.sh'
1818
- 'VERSION'
1919

20+
permissions:
21+
contents: read
22+
packages: write
2023

2124
env:
2225
REGISTRY: ghcr.io
2326
IMAGE_NAME: ${{ github.repository }}
2427

2528
jobs:
2629
build-and-push-image:
27-
if: ${{github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true}}
30+
if: |
31+
github.event_name == 'workflow_dispatch' ||
32+
(github.event_name == 'pull_request' && github.event.pull_request.merged == true)
2833
runs-on: ubuntu-latest
29-
permissions:
30-
contents: read
31-
packages: write
3234

3335
steps:
3436
- name: Checkout repository

.github/workflows/build-mkdocs-website.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,49 @@ on:
1010
- 'docs/**/**'
1111
- 'mkdocs.yml'
1212

13-
permissions:
14-
contents: write
15-
1613
jobs:
1714
build-and-deploy:
1815
if: |
1916
github.event_name == 'workflow_dispatch' ||
2017
(github.event_name == 'pull_request' && github.event.pull_request.merged == true)
2118
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
2221

2322
steps:
2423
- name: Checkout repository
25-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2625

2726
- name: Set up Python
28-
uses: actions/setup-python@v2
27+
uses: actions/setup-python@v5
2928
with:
3029
python-version: 3.x
3130

3231
- name: Install dependencies
3332
run: pip install mkdocs mkdocs-material[imaging]
3433

34+
- name: Determine deployment path
35+
id: path
36+
run: |
37+
if [[ "${{ github.ref_name }}" == "main" ]]; then
38+
echo "url=https://contributor.r-project.org/r-dev-env" >> "$GITHUB_OUTPUT"
39+
else
40+
echo "url=https://contributor.r-project.org/r-dev-env/devel" >> "$GITHUB_OUTPUT"
41+
fi
42+
43+
- name: Modify site_url in mkdocs.yml
44+
run: |
45+
echo "Setting site_url to ${{ steps.path.outputs.url }}"
46+
sed -i "s|^site_url:.*|site_url: '${{ steps.path.outputs.url }}'|" mkdocs.yml
47+
48+
3549
- name: Build MkDocs
3650
run: mkdocs build
3751

3852
- name: Deploy to GitHub Pages
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3955
run: |
56+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
4057
mkdocs gh-deploy --force
4158
git push origin gh-pages
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/optimize-docs-images.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Optimize Docs Images
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches: ["main","devel"]
67
types: [closed]
@@ -9,7 +10,9 @@ on:
910

1011
jobs:
1112
optimize-images:
12-
if: ${{github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true}}
13+
if: |
14+
github.event_name == 'workflow_dispatch' ||
15+
(github.event_name == 'pull_request' && github.event.pull_request.merged == true)
1316
runs-on: ubuntu-latest
1417

1518
steps:

.github/workflows/schedule-docker-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
schedule:
55
- cron: '0 0 1,15 * *'
66

7+
permissions:
8+
contents: read
9+
packages: write
710

811
env:
912
REGISTRY: ghcr.io
@@ -12,9 +15,6 @@ env:
1215
jobs:
1316
build-and-push-image:
1417
runs-on: ubuntu-latest
15-
permissions:
16-
contents: read
17-
packages: write
1818
strategy:
1919
matrix:
2020
branch: [main, devel]

Dockerfile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN sed -i.bak "/^#.*deb-src.*universe$/s/^# //g" /etc/apt/sources.list \
1818
subversion \
1919
&& add-apt-repository --enable-source --yes "ppa:marutter/rrutter4.0" \
2020
&& wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \
21+
&& apt -y build-dep r-base-dev \
2122
&& apt-get install -y r-base-dev \
2223
&& rm -rf /var/lib/apt/lists/*
2324

@@ -32,16 +33,5 @@ RUN Rscript -e "runiverse <- sprintf('r-universe.dev/bin/linux/%s-%s/%s/', \
3233
nx10 = paste0('https://nx10.', runiverse))); \
3334
print('Packages installed.')"
3435

35-
36-
# Install ShellCheck using apt-get from the PPA
37-
RUN apt-get update \
38-
&& apt-get install -y --no-install-recommends \
39-
shellcheck
40-
41-
# Install ccache
42-
RUN apt-get install -y --no-install-recommends \
43-
ccache \
44-
&& rm -rf /var/lib/apt/lists/*
45-
4636
ARG CONTAINER_VERSION
47-
ENV CONTAINER_VERSION=${CONTAINER_VERSION}
37+
ENV CONTAINER_VERSION=${CONTAINER_VERSION}

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
site_name: R Devel Container Docs
2+
site_url: ''
23
repo_name: r-devel/r-dev-env
34
repo_url: https://github.com/r-devel/r-dev-env
45
nav:

0 commit comments

Comments
 (0)