Check Documentation for Broken Links #712
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 Documentation for Broken Links | |
on: | |
schedule: | |
- cron: "0 10 * * 1-5" # Runs at 10:00 UTC on Mon, Tue, Wed, Thu and Fri. (see https://crontab.guru) | |
workflow_dispatch: # Run on manual trigger | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Build and run the url tester csproj | |
run: | | |
cd "URL Test" | |
dotnet build /p:Configuration=Release /v:quiet /p:WarningLevel=1 URLTest.csproj | |
dotnet run bin/Debug/net6.0/process.dll | |
continue-on-error: true | |
- name: Push to Branch | |
run: |- | |
if [[ $(git diff | wc -m) == 0 ]]; then | |
exit 0 | |
fi | |
BRANCH=github-action-url-test | |
git config user.name GitHub Actions | |
git config user.email github-actions@github.com | |
git checkout -b $BRANCH | |
git add . | |
git commit -m "Code generated by URLTest" | |
git push --set-upstream origin $BRANCH -f |