-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflows to check broken links and deploy papers to GH Pages (#6236
- Loading branch information
Showing
10 changed files
with
121 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This job checks for broken links in the various files. | ||
|
||
name: "🔗 Broken Links" | ||
|
||
on: | ||
schedule: | ||
- cron: 0 0 * * * # Daily at midnight | ||
workflow_dispatch: # Or manually dispatch the job | ||
pull_request: | ||
paths: | ||
- .github/ISSUE_TEMPLATE/bug_report.yml | ||
- .github/ISSUE_TEMPLATE/feature_request.yml | ||
- .github/PULL_REQUEST_TEMPLATE.md | ||
- .github/SECURITY.md | ||
- CODE_OF_CONDUCT.md | ||
- CONTRIBUTING.adoc | ||
- LICENSE | ||
- NOTICE | ||
- README.adoc | ||
- RELEASE.adoc | ||
- STYLEGUIDE.adoc | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: [plutus-shared, self-hosted] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
|
||
- name: Run Linkchecker | ||
run: | | ||
nix develop --no-warn-dirty --accept-flake-config --command ./scripts/check-broken-links.sh |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This job builds various papers and deploys them to: | ||
# https://intersectmbo.github.io/plutus/resources | ||
|
||
name: "📝 Papers & Specs" | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: [self-hosted, plutus-shared] | ||
permissions: | ||
contents: write | ||
environment: | ||
name: github-pages | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
|
||
- name: Build Papers | ||
run: | | ||
TARGETS=( | ||
plutus-report | ||
plutus-core-spec | ||
extended-utxo-spec | ||
unraveling-recursion-paper | ||
system-f-in-agda-paper | ||
eutxo-paper | ||
utxoma-paper | ||
eutxoma-paper | ||
) | ||
mkdir -p _resources | ||
for target in "${TARGETS[@]}"; do | ||
nix build --no-warn-dirty --accept-flake-config .#latex-documents.x86_64-linux.${target} | ||
cp -fr ./result/*.pdf _resources/${target}.pdf | ||
done | ||
- name: Publish Papers | ||
uses: JamesIves/[email protected] | ||
with: | ||
folder: _resources | ||
target-folder: resources | ||
single-commit: true |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
TARGETS=( | ||
.github/ISSUE_TEMPLATE/bug_report.yml | ||
.github/ISSUE_TEMPLATE/feature_request.yml | ||
.github/PULL_REQUEST_TEMPLATE.md | ||
.github/SECURITY.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.adoc | ||
LICENSE | ||
NOTICE | ||
README.adoc | ||
RELEASE.adoc | ||
STYLEGUIDE.adoc | ||
) | ||
|
||
FAILED=0 | ||
|
||
for file in "${TARGETS[@]}"; do | ||
echo "Checking ${file}" | ||
grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}" \ | ||
| linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin \ | ||
--ignore-url https://img.shields.io/matrix/plutus-core%3Amatrix.org # For some reason linkchecker fails to check this URL though it is valid | ||
if [ $? -ne 0 ]; then | ||
echo "${file} has broken links, see output above" | ||
FAILED=1 | ||
fi | ||
done | ||
|
||
exit "${FAILED}" |