-
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.
Merge pull request #7 from kolosovpetro/updates
Release/v1.0.0
- Loading branch information
Showing
32 changed files
with
712 additions
and
232 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,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
|
||
[*.{xml,yml,yaml}] | ||
indent_size = 2 |
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,102 @@ | ||
name: 'Build and Deploy LaTeX' | ||
on: | ||
workflow_call: | ||
inputs: | ||
file_name: | ||
description: 'LaTeX root file name without extension, example: MyTeXFile' | ||
required: true | ||
type: string | ||
|
||
runs_on: | ||
description: 'Agent image' | ||
required: true | ||
type: string | ||
|
||
workflow_name: | ||
description: 'Workflow name' | ||
required: true | ||
type: string | ||
|
||
build_assets_path: | ||
description: 'Build assets path' | ||
required: true | ||
type: string | ||
|
||
working_directory_for_latex: | ||
description: 'Working directory for LaTeX' | ||
required: true | ||
type: string | ||
|
||
env: | ||
TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
USERNAME: "kolosovpetro" | ||
EMAIL: "kolosovp94@gmail.com" | ||
MESSAGE: "CICD deploy of ${{ inputs.file_name }} PDF document" | ||
|
||
jobs: | ||
build-pdf: | ||
runs-on: ${{ inputs.runs_on }} | ||
name: ${{ inputs.workflow_name }} | ||
|
||
steps: | ||
- name: '🔎 Fetch sources 🔎' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: '⬇️ Install GitVersion ⬇️' | ||
uses: gittools/actions/gitversion/setup@v3.0.0 | ||
with: | ||
versionSpec: '5.x' | ||
preferLatestVersion: true | ||
|
||
- name: '🤔 Determine Version 🤔' | ||
uses: gittools/actions/gitversion/execute@v3.0.0 | ||
with: | ||
useConfigFile: true | ||
|
||
- name: '📜 Print Version 📜' | ||
run: | | ||
echo "SemVer: ${{ env.GitVersion_SemVer }}" | ||
echo "BranchName: ${{ env.GitVersion_BranchName }}" | ||
echo "ShortSha: ${{ env.GitVersion_ShortSha }}" | ||
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}" | ||
echo "Next version: $newVersion" | ||
- name: '🔄 Update version.tex 🔄' | ||
shell: bash | ||
run: | | ||
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}" | ||
sed -i "s|Local-0.1.0|$newVersion|" "src/sections/version.tex" | ||
- name: '🛠 Build PDF 🛠' | ||
uses: xu-cheng/latex-action@v3 | ||
with: | ||
root_file: '${{ inputs.file_name }}.tex' | ||
working_directory: '${{ inputs.working_directory_for_latex }}' | ||
|
||
- name: '⬆️ Upload build assets ⬆️' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: '${{ inputs.file_name }}-${{ env.GitVersion_InformationalVersion }}' | ||
path: '${{ inputs.build_assets_path }}' | ||
|
||
- name: '⬆️ Upload artifacts PDF ⬆️' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: '${{ inputs.file_name }}-PDF-${{ env.GitVersion_InformationalVersion }}' | ||
path: '${{ inputs.working_directory_for_latex}}/${{ inputs.file_name }}.pdf' | ||
|
||
- name: '📀 Clone repository 📀' | ||
run: | | ||
git clone https://${{ env.TOKEN }}@github.com/kolosovpetro/kolosovpetro.github.io.git ~/kolosovpetro.github.io | ||
cp src/${{ inputs.file_name }}.pdf ~/kolosovpetro.github.io/pdf/${{ inputs.file_name }}.pdf | ||
- name: '❇️ Commit changes ❇️' | ||
run: | | ||
cd ~/kolosovpetro.github.io | ||
git config --global user.name "${{ env.USERNAME }}" | ||
git config --global user.email "${{ env.EMAIL }}" | ||
git add . | ||
git commit -m "${{ env.MESSAGE }}" | ||
git push |
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,82 @@ | ||
name: 'Build LaTeX' | ||
on: | ||
workflow_call: | ||
inputs: | ||
file_name: | ||
description: 'LaTeX root file name without extension, example: MyTeXFile' | ||
required: true | ||
type: string | ||
|
||
runs_on: | ||
description: 'Agent image' | ||
required: true | ||
type: string | ||
|
||
workflow_name: | ||
description: 'Workflow name' | ||
required: true | ||
type: string | ||
|
||
build_assets_path: | ||
description: 'Build assets path' | ||
required: true | ||
type: string | ||
|
||
working_directory_for_latex: | ||
description: 'Working directory for LaTeX' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-pdf: | ||
runs-on: ${{ inputs.runs_on }} | ||
name: ${{ inputs.workflow_name }} | ||
|
||
steps: | ||
- name: '🔎 Fetch sources 🔎' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: '⬇️ Install GitVersion ⬇️' | ||
uses: gittools/actions/gitversion/setup@v3.0.0 | ||
with: | ||
versionSpec: '5.x' | ||
preferLatestVersion: true | ||
|
||
- name: '🤔 Determine Version 🤔' | ||
uses: gittools/actions/gitversion/execute@v3.0.0 | ||
with: | ||
useConfigFile: true | ||
|
||
- name: '📜 Print Version 📜' | ||
run: | | ||
echo "SemVer: ${{ env.GitVersion_SemVer }}" | ||
echo "BranchName: ${{ env.GitVersion_BranchName }}" | ||
echo "ShortSha: ${{ env.GitVersion_ShortSha }}" | ||
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}" | ||
echo "Next version: $newVersion" | ||
- name: '🔄 Update version.tex 🔄' | ||
shell: bash | ||
run: | | ||
newVersion="${{ env.GitVersion_SemVer }}+${{ env.GitVersion_BranchName }}.${{ env.GitVersion_ShortSha }}" | ||
sed -i "s|Local-0.1.0|$newVersion|" "src/sections/version.tex" | ||
- name: '🛠 Build PDF 🛠' | ||
uses: xu-cheng/latex-action@v3 | ||
with: | ||
root_file: '${{ inputs.file_name }}.tex' | ||
working_directory: '${{ inputs.working_directory_for_latex }}' | ||
|
||
- name: '⬆️ Upload build assets ⬆️' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: '${{ inputs.file_name }}-${{ env.GitVersion_InformationalVersion }}' | ||
path: '${{ inputs.build_assets_path }}' | ||
|
||
- name: '⬆️ Upload artifacts PDF ⬆️' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: '${{ inputs.file_name }}-PDF-${{ env.GitVersion_InformationalVersion }}' | ||
path: '${{ inputs.working_directory_for_latex}}/${{ inputs.file_name }}.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
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,20 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.0.0] - 2024-12-08 | ||
|
||
### Changed | ||
|
||
- Update CI/CD | ||
- Add editor config | ||
- Add GitVersion config | ||
- Update readme | ||
- Add build scripts | ||
- Fix PDF images warnings | ||
- Move sections to separate files | ||
- Add document versioning | ||
- Update metadata |
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 @@ | ||
mode: Mainline |
Oops, something went wrong.