Skip to content

Commit

Permalink
Add linkchecker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
doggy8088 committed Nov 18, 2023
1 parent f796a99 commit e8790dc
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Create a GItHub Actions workflow for me. Here are the steps I need:
# 1. Install linkchecker
# 2. Run the following commands
# linkchecker --check-extern --no-robots -F "html/utf-8/linkchecker-example.html" https://doggy8088.github.io/Learn-Git-in-30-days/
# 3. Trigger weekly on sunday midnight at 3am.
# 4. Deploy artifact

name: Link Checker Weekly

on:
schedule:
- cron: "0 3 * * 0" # Trigger every Sunday at 3am

jobs:
link_checker:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install linkchecker
run: |
sudo apt-get update
sudo apt-get install -y linkchecker
- name: Run linkchecker
run: linkchecker --check-extern --no-robots -F "html/utf-8/linkchecker-result.html" https://doggy8088.github.io/Learn-Git-in-30-days/

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: linkchecker-result
path: linkchecker-result.html

0 comments on commit e8790dc

Please sign in to comment.