self-hosted-chains #185
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |