From 9a34fd441538a49aa16d67840cc95c51e3c2b7f9 Mon Sep 17 00:00:00 2001 From: tobil4sk Date: Wed, 31 Jul 2024 18:03:34 +0100 Subject: [PATCH] [ci] Add github actions build job (#179) * [ci] Add github actions build job * Specify hxtemplo version in hxml * Use highlighter 0.6.1 for now PR to update to highlighter 0.7.0 is yet to be merged: #176 --- .github/workflows/main.yml | 42 ++++++++++++++++++++++++++++++++++++++ CodeCookBook.hxml | 2 +- highlighting.hxml | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..4e0ac3f1d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + # we need full git history for article dates + fetch-depth: 0 + + - name: Setup Haxe + uses: krdlab/setup-haxe@v1 + with: + haxe-version: 4.3.5 + + # we are using this version in order to build vscode-textmate + - name: Setup Node + uses: actions/setup-node@v1 + + - name: Install + # at some point all npm needs to be in package.json + run: | + npm install + npm install -g less@2.7 + npm install -g less-plugin-clean-css@1.5 + haxelib install CodeCookBook-neko.hxml --always --quiet + haxelib install highlighting.hxml --always --quiet + haxelib list + + - name: Generate website + run: | + haxe CodeCookBook-neko.hxml + haxe highlighting.hxml + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./output diff --git a/CodeCookBook.hxml b/CodeCookBook.hxml index 94d239122..617bc70df 100644 --- a/CodeCookBook.hxml +++ b/CodeCookBook.hxml @@ -4,7 +4,7 @@ --next -lib markdown --lib hxtemplo +-lib hxtemplo:git:https://github.com/Simn/hxtemplo.git -lib hxparse -cp src -main Main diff --git a/highlighting.hxml b/highlighting.hxml index 6ccce7b82..ef4907942 100644 --- a/highlighting.hxml +++ b/highlighting.hxml @@ -1,6 +1,6 @@ -cp src -main Highlighting -lib hxnodejs --lib highlighter +-lib highlighter:0.6.1 -js bin/patch.js -cmd node bin/patch.js