Skip to content

Commit

Permalink
ci(deploy): convert file references to github link
Browse files Browse the repository at this point in the history
For the deployments, the references in `README.md` to files in the
repository must point to a "globally accessible" link. These links
should also point to the files of the corresponding release tag.
  • Loading branch information
Yannick-Dayer committed Sep 13, 2024
1 parent 4a05978 commit 5081039
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
run: |
pip install --upgrade pip
pip install build
- name: Patch the README links to point to the correct files at the current tag
run: |
perl -i.bak -pe 's/\[(.*)\]\((?!http)\.?\/?(.*)\.([a-z]+)\)/[\1](https:\/\/raw.github.com\/idiap\/RawSpeechClassification\/${{ github.event.release.tag_name }}\/\2.\3)/g' README.md
perl -i.bak -pe 's/\[(.*)\]\((?!http)\.?\/?(.*)\)/[\1](https:\/\/github.com\/idiap\/RawSpeechClassification\/tree\/${{ github.event.release.tag_name }}\/\2)/g' README.md
rm README.md.bak
- name: Package the project
run: python -m build
- name: Produce a GitHub actions artifact (the package)
Expand Down

0 comments on commit 5081039

Please sign in to comment.