From 58606cede53a91ee7a24297a450a1a54aae1852a Mon Sep 17 00:00:00 2001 From: Jamy Golden Date: Sun, 1 Dec 2024 13:22:31 +0100 Subject: [PATCH] Attempt to fix broken github action --- .github/workflows/pages.yml | 43 ++++++++++++++++++++++++++----------- build.sh | 7 +++--- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 2272895..32f0f8a 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,26 +1,43 @@ name: Update with the latest colorschemes on: workflow_dispatch: - schedule: - - cron: "0 0 * * 0" # https://crontab.guru/every-week - push: - branches: [ "main" ] + # schedule: + # - cron: "0 0 * * 0" # https://crontab.guru/every-week + # push: + # branches: [ "main" ] jobs: build: runs-on: ubuntu-latest steps: - name: Fetch the repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Setup Vim and Ruby - run: sudo apt install -y ruby vim - + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + - run: bundle exec rake + + - uses: rhysd/action-setup-vim@v1 + id: vim - name: Build - run: bash build.sh + env: + THEMIS_VIM: ${{ steps.vim.outputs.executable }} + run: | + bash build.sh THEMIS_VIM - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - name: "Commit the changes, if any" + uses: "stefanzweifel/git-auto-commit-action@be823a7e51f116fecebc222b8307716921375992" # 5.0.1 with: - github_token: ${{ secrets.BOT_ACCESS_TOKEN }} - publish_dir: ./out + commit_message: "Update with the latest tinted-theming colorschemes" + branch: ${{ inputs.ref }} + commit_user_name: "tinted-theming-bot" + commit_user_email: "tintedtheming@proton.me" + commit_author: "tinted-theming-bot " + + +# - name: Deploy +# uses: peaceiris/actions-gh-pages@v3 +# with: +# github_token: ${{ secrets.BOT_ACCESS_TOKEN }} +# publish_dir: ./out \ No newline at end of file diff --git a/build.sh b/build.sh index 3c49902..bb4b65c 100644 --- a/build.sh +++ b/build.sh @@ -15,11 +15,12 @@ setup() { main() { setup + VIM_EXECUTABLE=${1:-vim} colorschemes=($(ls schemes/base16/ | grep yaml | sed 's/\..*$//')) tmpfile="$0.html" - vim -es -u NORC -N \ + VIM_EXECUTABLE -es -u NORC -N \ -c 'silent! set termguicolors' \ -c 'silent! set runtimepath+=base16-vim' \ -c 'silent! syntax on' \ @@ -32,7 +33,7 @@ main() { for colorscheme in ${colorschemes[@]}; do echo $colorscheme - vim -es -u NORC -N \ + VIM_EXECUTABLE -es -u NORC -N \ -c 'set termguicolors' \ -c 'set runtimepath+=tinted-vim' \ -c 'syntax on' \ @@ -51,4 +52,4 @@ main() { erb template.erb > out/index.html } -main +main \ No newline at end of file