From a61464b21bd156b51f119c5e1b831878d89f93a2 Mon Sep 17 00:00:00 2001 From: octospacc Date: Tue, 20 Sep 2022 18:01:57 +0200 Subject: [PATCH] Fix build scripts --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ .gitignore | 2 ++ .gitlab-ci.yml | 5 +---- Build.sh | 7 +++++++ 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100644 .gitignore create mode 100755 Build.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..f82aaaf7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Build and Deploy with TiddlyWiki + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + page_build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build + run: | + sudo apt update + sudo apt install -y npm + sudo npm install -g tiddlywiki + ./Build.sh + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: public diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..1ef2bfee --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +public/Static.html +public/Style.css diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f216019f..2a4d35e1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,10 +8,7 @@ before_script: | pages: stage: deploy script: | - #./Build.sh - cd ./public - tiddlywiki ./index.html --rendertiddler $:/core/templates/alltiddlers.template.html Static.html text/plain - mv ./output/* ./ + ./Build.sh artifacts: paths: - public diff --git a/Build.sh b/Build.sh new file mode 100755 index 00000000..ff9eb07d --- /dev/null +++ b/Build.sh @@ -0,0 +1,7 @@ +#!/bin/sh +cd ./public +tiddlywiki \ + --load index.html \ + --output ./ \ + --rendertiddler $:/core/templates/static.template.css Style.css text/plain \ + --rendertiddler $:/core/templates/alltiddlers.template.html Static.html text/plain