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 : [ master ]
11+
12+ # Allows you to run this workflow manually from the Actions tab
13+ workflow_dispatch :
14+ jobs :
15+ # This workflow contains a single job called "build"
16+ build :
17+ # It will run on ubuntu-latest image
18+ runs-on : codeberg-medium
19+ steps :
20+ - uses : https://code.forgejo.org/actions/checkout@v7
21+ - 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
23+ run : |
24+ sudo apt-get -y update
25+ sudo apt-get -y upgrade
26+ 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
27+ - name : Run build script
28+ run : |
29+ pandoc -v
30+ echo "Updating permissions on build script"
31+ chmod +x build.sh
32+ echo "Bulding"
33+ ON_CODEBERG=1 ADD_COMMIT=1 ./build.sh
34+ echo "Next step: creating release!"
35+ - uses : https://code.forgejo.org/actions/forgejo-release@v2.13.1
36+ with :
37+ token : ${{ forge.token }}
38+ tag : latest-master
39+ direction : upload
40+ release-dir : output
41+ override : true
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ OUTPUT_FOLDER = " "
4+
35get_entries () {
46 echo $( find $1 -maxdepth 1 -regextype egrep -regex ' .*\/[0-9A-Z]{1,2}_[A-Za-z_.]*' | sort)
57}
@@ -40,4 +42,11 @@ if [ -v ADD_COMMIT ]; then
4042 mv .pandoc/pandoc_1.yaml .pandoc/pandoc.yaml
4143fi
4244
43- $( pandoc $pandoc_flags $cmd_body .pandoc/pandoc.yaml -o $pandoc_filename )
45+ if [ -v ON_CODEBERG ]; then
46+ echo " CODEBERG env identified, creating output directory"
47+ mkdir output
48+ OUTPUT_FOLDER=" output/"
49+ echo $OUTPUT_FOLDER
50+ fi
51+
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