Skip to content

Commit

Permalink
Attempt to fix broken github action
Browse files Browse the repository at this point in the history
  • Loading branch information
JamyGolden committed Dec 1, 2024
1 parent 546ac2b commit 58606ce
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
43 changes: 30 additions & 13 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -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: "[email protected]"
commit_author: "tinted-theming-bot <[email protected]>"


# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.BOT_ACCESS_TOKEN }}
# publish_dir: ./out
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand All @@ -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' \
Expand All @@ -51,4 +52,4 @@ main() {
erb template.erb > out/index.html
}

main
main

0 comments on commit 58606ce

Please sign in to comment.