-
Notifications
You must be signed in to change notification settings - Fork 181
61 lines (51 loc) · 1.5 KB
/
links.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Check Links
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-run-lychee:
runs-on: ubuntu-latest
steps:
- name: Checkout ethereum-optimism/docs
uses: actions/checkout@v2
with:
repository: 'ethereum-optimism/docs'
path: 'docs'
- name: Checkout lycheeverse/lychee
uses: actions/checkout@v2
with:
repository: 'lycheeverse/lychee'
path: 'lychee'
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build Lychee
run: |
cd lychee
cargo build --release
- name: Add Lychee to PATH
run: echo "$GITHUB_WORKSPACE/lychee/target/release" >> $GITHUB_PATH
- name: Run Lychee
run: |
cd docs
lychee --config ./lychee.toml --quiet "./pages"
- name: Notify Slack on failure
uses: ravsamhq/notify-slack-action@v2
if: always()
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: "{workflow} has {status_message} (<{run_url}|view errors>)"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
footer: "<{run_url}|View Run>"
mention_users_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}