-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MRI-CIA project form and the new workflow
- Loading branch information
0 parents
commit 005dc52
Showing
3 changed files
with
47 additions
and
0 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,31 @@ | ||
name: Builds the documents on release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
convert_and_upload: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install LibreOffice | ||
run: sudo apt-get update && sudo apt-get install -y libreoffice | ||
|
||
- name: Convert ODT to PDF | ||
run: | | ||
find . -name "*.odt" -exec libreoffice --headless --convert-to pdf {} \; | ||
- name: Upload PDF to release | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: | | ||
$(find . -name "*.pdf" | tr '\n' ' ') | ||
asset_name: | | ||
$(find . -name "*.pdf" -exec basename {} \; | tr '\n' ' ') | ||
asset_content_type: application/pdf | ||
|
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,16 @@ | ||
# MRI-CIA Documents | ||
|
||
- The repository contains the documents relative to the MRI-CIA version. | ||
- It allows to have a unique and constant link to the latest version of documents. | ||
- Files can be "built" ('odt' to 'pdf', ...) from the GitHub actions of the repository. | ||
|
||
## Add a new document, example with an ODT | ||
|
||
- Add the '.odt' file into this repository. | ||
- Modify the workflow (.github/workflows/on-release.yml) to "build" your document (ex: convert your '.odt' to '.pdf') on release. | ||
- Make your modifications as you wish and push them. | ||
- When you will make a new release, the PDF will be part of the assets. | ||
- You can access the assets of your latest release with the URL: github.com/MontpellierRessourcesImagerie/mri-cia-documents/releases/latest/my-document.pdf | ||
|
||
|
||
**Note:** The ODT to PDF conversion is already insured for any ODT document at the root of this repo, you don't need to edit the workflow. |
Binary file not shown.