Skip to content

Commit 41aa09c

Browse files
authored
Make this action a composite action, fix documentation and bugs (#15)
1 parent fd5c2c2 commit 41aa09c

File tree

4 files changed

+236
-365
lines changed

4 files changed

+236
-365
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 300 deletions
This file was deleted.

.github/workflows/selftest.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ on:
1616
branches:
1717
- main
1818

19+
env:
20+
ssh_key: ${{ secrets.SSH_PRIVATE_KEY }}
21+
dir_preview_subdir: "webdeploy-pr-${{ github.event.number }}"
22+
condition_production: ${{ github.ref == 'refs/heads/main' }}
23+
1924
jobs:
2025
build:
2126
name: Build Website (Placeholder)
@@ -31,8 +36,10 @@ jobs:
3136
echo "<html><body>
3237
<p>Hello world: <a href="https://openrailassociation.org">LINK 1</a></p>
3338
<p>Don't linkcheck me: <a href="https://example.com">LINK 2</a></p>
39+
<p>Relative link: <a href="foobar.html">LINK 3</a></p>
3440
<p>${{ github.ref }}.${{ github.event.pull_request.head.sha }}</p>
3541
</body></html>" > dist/index.html
42+
echo "baz" > dist/foobar.html
3643
3744
- name: Upload artifact
3845
uses: actions/upload-artifact@v4
@@ -43,18 +50,24 @@ jobs:
4350
deploy:
4451
name: Web Deployment
4552
needs: build
46-
uses: ./.github/workflows/deploy.yml
47-
with:
48-
artifact_name: website
49-
domain_production: https://web-deployment-action.openrailassociation.org
50-
domain_preview: https://web-preview.openrailassociation.org
51-
ssh_host: uberspace1.openrailassociation.org
52-
ssh_user: openrail
53-
dir_base: "/var/www/virtual/openrail"
54-
dir_production: "web-deployment-action.openrailassociation.org"
55-
dir_preview_base: "web-preview.openrailassociation.org"
56-
dir_preview_subdir: "webdeploy-pr-${{ github.event.number }}"
57-
linkchecker_exclude: "example.com,example.org"
58-
condition_production: ${{ github.ref == 'refs/heads/main' }}
59-
secrets:
60-
ssh_key: ${{ secrets.SSH_PRIVATE_KEY }}
53+
runs-on: ubuntu-24.04
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
- name: Call action locally
58+
uses: ./
59+
with:
60+
artifact_name: website
61+
condition_production: ${{ env.condition_production }}
62+
domain_production: https://web-deployment-action.openrailassociation.org
63+
domain_preview: https://web-preview.openrailassociation.org
64+
dir_base: "/var/www/virtual/openrail"
65+
dir_production: "web-deployment-action.openrailassociation.org"
66+
dir_preview_base: "web-preview.openrailassociation.org"
67+
dir_preview_subdir: ${{ env.dir_preview_subdir }}
68+
ssh_host: uberspace1.openrailassociation.org
69+
ssh_user: openrail
70+
ssh_key: ${{ secrets.SSH_PRIVATE_KEY }}
71+
linkchecker_exclude: "example.com,example.org"
72+
linkchecker_include_fragments: true
73+
linkchecker_verbose: true

0 commit comments

Comments
 (0)