File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This workflow is triggered everytime a push is made on master.
2+ # It will trigger the pdf build and publish it on the "Development" release
3+ name : Pandoc Automation
4+
5+ # It will run on every push on master
6+ on :
7+ # Triggers the workflow on push or pull request events but only for the master branch
8+ push :
9+ paths-ignore : [ '**/README.md', '**/FUNDING.yml', '**/sync-gh-pages.yaml' ]
10+ branches : [ dreamos82-patch-1 ]
11+
12+ # Allows you to run this workflow manually from the Actions tab
13+ workflow_dispatch :
14+ env : ON_CODEBERG=1
15+ jobs :
16+ # This workflow contains a single job called "build"
17+ build :
18+ # It will run on ubuntu-latest image
19+ runs-on : codeberg-medium
20+ steps :
21+ - uses : https://code.forgejo.org/actions/checkout@v7
22+ - name : Install dependencies
23+ # We need to manually install pandoc, because the version carried with ubuntu 22.04 is affected by a bug that cause the build to fail
24+ run : |
25+ sudo apt-get -y update
26+ sudo apt-get -y upgrade
27+ sudo apt-get -y install texlive-latex-base texlive texlive-xetex texlive-fonts-recommended librsvg2-2 liblua5.3-0 librsvg2-bin librsvg2-common libgmp10 pandoc pandoc-data
28+ - name : Run build script
29+ run : |
30+ pandoc -v
31+ echo "Updating permissions on build script"
32+ chmod +x build.sh
33+ echo "Bulding"
34+ ADD_COMMIT=1 ./build.sh
35+ echo "Next step: creating release!"
36+ - uses : https://code.forgejo.org/actions/forgejo-release@v2.13.1
37+ with :
38+ token : ${{ forge.token }}
39+ tag : latest-master
40+ direction : upload
41+ release-dir : output
42+ override : true
Original file line number Diff line number Diff line change 77 # Triggers the workflow on push or pull request events but only for the master branch
88 push :
99 paths-ignore : [ '**/README.md', '**/FUNDING.yml', '**/sync-gh-pages.yaml' ]
10- branches : [ dreamos82-patch-1 ]
10+ branches : [ master ]
1111
1212 # Allows you to run this workflow manually from the Actions tab
1313 workflow_dispatch :
1414jobs :
1515 # This workflow contains a single job called "build"
1616 build :
1717 # It will run on ubuntu-latest image
18- runs-on : codeberg-medium
18+ runs-on : ubuntu-24.04
1919 steps :
20- - uses : https://code.forgejo.org/ actions/checkout@v7
20+ - uses : actions/checkout@v3
2121 - name : Install dependencies
22- # We need to manually install pandoc, because the version carried with ubuntu 22.04 is affected by a bug that cause the build to fail
22+ # WE need to manually install pandoc, because the version carried with ubuntu 22.04 is affected by a bug that cause the build to fail
2323 run : |
2424 sudo apt-get -y update
2525 sudo apt-get -y upgrade
@@ -31,11 +31,11 @@ jobs:
3131 chmod +x build.sh
3232 echo "Bulding"
3333 ADD_COMMIT=1 ./build.sh
34- echo "Next step: creating release! "
35- - uses : https://code.forgejo.org/actions/forgejo-release@v2.13.1
34+ echo "Next step: creating release"
35+ - uses : pyTooling/Actions/releaser@r0
3636 with :
37- token : ${{ forge.token }}
37+ token : ${{ secrets.GITHUB_TOKEN }}
3838 tag : latest-master
39- direction : upload
40- release-dir : output
41- override : true
39+ rm : true
40+ files : |
41+ *.pdf
Original file line number Diff line number Diff line change @@ -40,9 +40,13 @@ cmd_body+="LICENSE.md"
4040if [ -v ADD_COMMIT ]; then
4141 awk -v HASH=` git rev-parse HEAD` ' !found && /header-includes/ { print " |\n | based on commit: " HASH ; found=1 } 1' .pandoc/pandoc.yaml | tee .pandoc/pandoc_1.yaml
4242 mv .pandoc/pandoc_1.yaml .pandoc/pandoc.yaml
43+ fi
44+
45+ if [ -v ON_CODEBERG ]; then
46+ echo " CODEBERG env identified, creating output directory"
4347 mkdir output
44- OUTPUT_FOLDER=" output"
48+ OUTPUT_FOLDER=" output/"
49+ echo $OUTPUT_FOLDER
4550fi
4651
47- echo $OUTPUT_FOLDER
48- $( pandoc $pandoc_flags $cmd_body .pandoc/pandoc.yaml -o $OUTPUT_FOLDER /$pandoc_filename )
52+ $( pandoc $pandoc_flags $cmd_body .pandoc/pandoc.yaml -o $OUTPUT_FOLDER$pandoc_filename )
You can’t perform that action at this time.
0 commit comments