Skip to content

Commit 55b6826

Browse files
authoredApr 9, 2024··
chore(ci): Remove unmaintained Netlify action (#2093)
The [Netlify CLI action](https://github.com/netlify/actions) is unmaintained and using an EOL Node.js version (which it complains about on install) as well as the deprecated `set-output` syntax. This PR removes the action in favour of installing the CLI ourselves. Signed-off-by: Andrew Haines <haines@cerbos.dev>
1 parent 531e896 commit 55b6826

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed
 
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish docs
2+
3+
description: Publish docs to Netlify
4+
5+
inputs:
6+
auth_token:
7+
description: Netlify authentication token
8+
required: true
9+
10+
site_id:
11+
description: Netlify site ID
12+
required: true
13+
14+
runs:
15+
using: composite
16+
17+
steps:
18+
- name: Install Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version-file: .node-version
22+
23+
- name: Publish docs to Netlify
24+
shell: bash
25+
run: npx --package=netlify-cli -- netlify deploy --prod
26+
env:
27+
NETLIFY_AUTH_TOKEN: ${{ inputs.auth_token }}
28+
NETLIFY_SITE_ID: ${{ inputs.site_id }}

‎.github/workflows/docs.yaml

+3-6
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,10 @@ jobs:
2323

2424
- name: Generate docs
2525
uses: ./.github/actions/antora-docs
26-
id: docs
2726

2827
- name: Publish to Netlify
29-
uses: netlify/actions/cli@master
28+
uses: ./.github/actions/publish-docs
3029
with:
31-
args: deploy --prod
32-
env:
33-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
34-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
30+
auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
31+
site_id: ${{ secrets.NETLIFY_SITE_ID }}
3532

‎.github/workflows/release.yaml

+3-6
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,12 @@ jobs:
143143

144144
- name: Generate docs
145145
uses: ./.github/actions/antora-docs
146-
id: docs
147146

148147
- name: Publish to Netlify
149-
uses: netlify/actions/cli@master
148+
uses: ./.github/actions/publish-docs
150149
with:
151-
args: deploy --prod
152-
env:
153-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
154-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
150+
auth_token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
151+
site_id: ${{ secrets.NETLIFY_SITE_ID }}
155152

156153
publishHelm:
157154
name: Publish Helm chart

0 commit comments

Comments
 (0)
Please sign in to comment.