Skip to content

Commit 61de48a

Browse files
authored
Merge pull request #16 from OpenRailAssociation/more-fixes
2 parents 41aa09c + 837e421 commit 61de48a

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ jobs:
4848
- name: Build Website
4949
run: |
5050
mkdir -p dist && echo "<html>Hello</html>" > dist/index.html
51-
# Artifact has to be uploaded, using `artifact_name` as name
51+
# Artifact has to be uploaded. `name` has to be the action's input `artifact_name`
5252
- uses: actions/upload-artifact@v4
5353
with:
5454
name: website
5555
path: dist
56+
include-hidden-files: true
57+
retention-days: 1
5658

5759
deploy:
5860
needs: build
@@ -100,6 +102,7 @@ jobs:
100102
| `linkchecker_enabled` | <p>Enable link checker (true/false)</p> | `false` | `true` |
101103
| `linkchecker_exclude` | <p>Comma-separated list of domains to exclude from link checker</p> | `false` | `""` |
102104
| `linkchecker_include_fragments` | <p>Include anchor fragments in link checking</p> | `false` | `true` |
105+
| `linkchecker_offline` | <p>Only check local/relative links, do not fetch remote links (true/false)</p> | `false` | `false` |
103106
| `linkchecker_max_concurrency` | <p>Max concurrent requests for link checker</p> | `false` | `1` |
104107
| `linkchecker_user_agent` | <p>User-Agent for link checking</p> | `false` | `Mozilla/5.0 (Windows NT 10.0; Win64; x64)...` |
105108
| `linkchecker_retry_times` | <p>Retry delay in seconds for link checking</p> | `false` | `5` |

action.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ inputs:
9494
required: false
9595
default: "true"
9696

97+
linkchecker_offline:
98+
description: "Only check local/relative links, do not fetch remote links (true/false)"
99+
required: false
100+
default: "false"
101+
97102
linkchecker_max_concurrency:
98103
description: "Max concurrent requests for link checker"
99104
required: false
@@ -142,7 +147,12 @@ runs:
142147
- name: "Vars: PR Closed/Merged"
143148
shell: bash
144149
run: |
145-
echo "IS_PR_CLOSED_OR_MERGED=${{ github.event.pull_request && (github.event.pull_request.closed_at || github.event.pull_request.merged) }}" >> $GITHUB_ENV
150+
PR_CLOSED_OR_MERGED="${{ github.event.pull_request && (github.event.pull_request.closed_at || github.event.pull_request.merged) }}"
151+
if [ -n "$PR_CLOSED_OR_MERGED" ] && [ "$PR_CLOSED_OR_MERGED" != "false" ]; then
152+
echo "IS_PR_CLOSED_OR_MERGED=true" >> $GITHUB_ENV
153+
else
154+
echo "IS_PR_CLOSED_OR_MERGED=false" >> $GITHUB_ENV
155+
fi
146156
147157
- name: "Vars: Prod or Preview"
148158
shell: bash
@@ -179,6 +189,11 @@ runs:
179189
else
180190
echo "LINKCHECKER_FRAGMENTS=" >> $GITHUB_ENV
181191
fi
192+
if ${{ inputs.linkchecker_offline }}; then
193+
echo "LINKCHECKER_OFFLINE=--offline" >> $GITHUB_ENV
194+
else
195+
echo "LINKCHECKER_OFFLINE=" >> $GITHUB_ENV
196+
fi
182197
if ${{ inputs.linkchecker_verbose }}; then
183198
echo "LINKCHECKER_VERBOSE=--verbose" >> $GITHUB_ENV
184199
else
@@ -217,6 +232,7 @@ runs:
217232
-r ${{ inputs.linkchecker_retry_times }}
218233
-u "${{ inputs.linkchecker_user_agent }}"
219234
${{ env.LINKCHECKER_FRAGMENTS }}
235+
${{ env.LINKCHECKER_OFFLINE }}
220236
${{ env.LINKCHECKER_EXCLUDE }}
221237
${{ env.LINKCHECKER_VERBOSE }}
222238
--max-concurrency ${{ inputs.linkchecker_max_concurrency }}
@@ -247,7 +263,7 @@ runs:
247263
with:
248264
host: ${{ inputs.ssh_host }}
249265
username: ${{ inputs.ssh_user }}
250-
key: ${{ env.ssh_key }}
266+
key: ${{ inputs.ssh_key }}
251267
port: ${{ inputs.ssh_port }}
252268
timeout: ${{ inputs.ssh_timeout }}
253269
command_timeout: ${{ inputs.ssh_command_timeout }}

0 commit comments

Comments
 (0)