Skip to content

Commit 7a4eb3e

Browse files
authored
Merge pull request #48 from Bioconductor/copilot/update-basic-checks-workflow
Fix basic_checks.yaml: repair deploy step and modernize action versions
2 parents 7060790 + 355cf91 commit 7a4eb3e

1 file changed

Lines changed: 34 additions & 25 deletions

File tree

.github/workflows/basic_checks.yaml

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout Repository
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v6
2121

2222
- name: Query dependencies and update old packages
2323
run: |
@@ -28,7 +28,7 @@ jobs:
2828

2929
- name: Cache R packages
3030
if: runner.os != 'Windows'
31-
uses: actions/cache@v4
31+
uses: actions/cache@v5
3232
with:
3333
path: /usr/local/lib/R/site-library
3434
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ hashFiles('.github/depends.Rds') }}
@@ -52,12 +52,35 @@ jobs:
5252
PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site(".")'
5353
5454
- name: Upload pkgdown artifact
55-
uses: actions/upload-pages-artifact@v3
55+
if: github.event_name == 'push'
56+
uses: actions/upload-artifact@v4
5657
with:
58+
name: pkgdown-site
5759
path: docs
5860

61+
deploy:
62+
needs: r-build-and-check
63+
if: github.event_name == 'push' && success()
64+
runs-on: ubuntu-latest
65+
permissions:
66+
contents: write
67+
steps:
68+
- name: Checkout Repository
69+
uses: actions/checkout@v6
70+
71+
- name: Download pkgdown artifact
72+
uses: actions/download-artifact@v4
73+
with:
74+
name: pkgdown-site
75+
path: _site
76+
77+
- name: Deploy to GitHub Pages
78+
uses: JamesIves/github-pages-deploy-action@v4
79+
with:
80+
branch: gh-pages
81+
folder: _site
82+
5983
docker-build-and-push:
60-
#needs: r-build-and-check
6184
runs-on: ubuntu-latest
6285
permissions:
6386
contents: read
@@ -68,7 +91,7 @@ jobs:
6891

6992
steps:
7093
- name: Checkout Repository
71-
uses: actions/checkout@v4
94+
uses: actions/checkout@v6
7295

7396
- name: Set Environment Variables
7497
run: |
@@ -87,16 +110,16 @@ jobs:
87110
# https://github.com/sigstore/cosign-installer
88111
- name: Install cosign
89112
if: github.event_name != 'pull_request'
90-
uses: sigstore/cosign-installer@v3
113+
uses: sigstore/cosign-installer@v4.1.1
91114

92115
- name: Setup Docker buildx
93-
uses: docker/setup-buildx-action@v3
116+
uses: docker/setup-buildx-action@v4
94117

95118
# Login against a Docker registry except on PR
96119
# https://github.com/docker/login-action
97120
- name: Log into registry ${{ env.REGISTRY }}
98121
if: github.event_name != 'pull_request'
99-
uses: docker/login-action@v3
122+
uses: docker/login-action@v4
100123
with:
101124
registry: ${{ env.REGISTRY }}
102125
username: ${{ github.actor }}
@@ -106,32 +129,18 @@ jobs:
106129
# https://github.com/docker/metadata-action
107130
- name: Extract Docker metadata
108131
id: meta
109-
uses: docker/metadata-action@v5
132+
uses: docker/metadata-action@v6
110133
with:
111134
images: ${{ env.IMAGE }}
112135

113136
# Build and push Docker image with Buildx (don't push on PR)
114137
# https://github.com/docker/build-push-action
115138
- name: Build and push Docker image
116139
id: build-and-push
117-
uses: docker/build-push-action@v6
140+
uses: docker/build-push-action@v7
118141
with:
119142
context: .
120143
push: ${{ github.event_name != 'pull_request' }}
121144
tags: |
122145
${{ env.IMAGE }}:latest
123-
${{ env.IMAGE }}:${{ env.GIT_SHA }}
124-
125-
deploy:
126-
needs: r-build-and-check
127-
permissions:
128-
pages: write
129-
id-token: write
130-
runs-on: ubuntu-24.04
131-
environment:
132-
name: github-pages
133-
url: ${{ steps.deployment.outputs.page_url }}
134-
steps:
135-
- name: Deploy to GitHub Pages
136-
id: deployment
137-
uses: actions/deploy-pages@v4
146+
${{ env.IMAGE }}:${{ env.GIT_SHA }}

0 commit comments

Comments
 (0)