Skip to content

Commit

Permalink
Merge pull request #447 from sylhare/github-devops
Browse files Browse the repository at this point in the history
GitHub devops update
  • Loading branch information
sylhare authored Jul 26, 2024
2 parents dc0657c + 53e4e15 commit c31b342
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

14 changes: 7 additions & 7 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#!/bin/sh
#
# OPTIONAL
# Called by "git commit" with no arguments.
# The hook should run gulp to optimize assets.
# Will exit with non-zero status if it wants to stop the commit.

: << 'END' # Ancillary code to ensure environment before running gulp
# If it's on the right directory, proceed. Else, try to fix it. If fail, abort commit.
if [ ${PWD##*/} != "lib" ] ; then
cd lib || exit 1
if [ ${PWD##*/} != "assets" ] ; then
cd assets || exit 1
fi
# If gulp is intalled and gulpfile.js is present, then proceed. Else, abort commit.
if ! [ -f "gulpfile.js" ] || ! command -v gulp; then
printf "gulpfile.js not found or gulp-cli not installed!\n"
# If gulp is installed and gulpfile.js is present, then proceed. Else, abort commit.
if ! [ -f "gulpfile.js" ] || ! command -v gulp; then
printf "gulpfile.js not found or gulp-cli not installed! Run npm i to install it.\n"
exit 1
fi
END

# If there are non-staged assets, abort commit.
if git status --porcelain | grep -E '^(\?\?|AM|\nM).*assets/.*$' >/dev/null; then
printf "There are non-staged assets, be sure to run gulp before commiting changes!\n"
printf "There are non-staged assets, be sure to run gulp before committing changes!\n"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gem-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install github-pages gem 2.7.4
continue-on-error: true
run: bundle install
working-directory: ./.github/workflows
working-directory: ./.github/workflows/ruby-2.7.4
if: matrix.ruby == '2.7.4'
- name: Install github-pages gem
run: |
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit c31b342

Please sign in to comment.