Skip to content

Commit

Permalink
fixes: #14 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngeorger authored Oct 28, 2024
1 parent 2a7694c commit 43516a0
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
with:
api-url: ${{ secrets.GHOST_API_URL }}
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
exclude: "node_modules gulpfile.js yarn.lock .gitignore .github .git LICENSE README.md .pre-commit-config.yaml routes.yaml tailwind.config.js"
exclude: "node_modules gulpfile.js yarn.lock .gitignore .github .git LICENSE README.md .pre-commit-config.yaml routes.yaml tailwind.config.js .nvmrc "

18 changes: 12 additions & 6 deletions .github/workflows/tests-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
name: tests-pr

on:
workflow_dispatch:
pull_request:
branches: [ "main" ]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
Expand All @@ -22,8 +23,7 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
-
name: Harden Runner
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
Expand All @@ -40,10 +40,16 @@ jobs:
cache-dependency-path: ./yarn.lock

- name: Install and test with ${{ matrix.node-version }}
continue-on-error: true
id: install
run: |
npm install -g gscan
yarn install
yarn build
yarn test
yarn test:ci
yarn run test:dev
- name: Install if previous step failed
if: steps.install.outcome == 'failure'
run: |
yarn install
yarn build
npx gscan . --verbose
6 changes: 2 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
workflow_dispatch:
push:
branches: [ "main" ]
workflow_call:

permissions:
contents: read
Expand Down Expand Up @@ -42,8 +41,7 @@ jobs:

- name: Install and test with ${{ matrix.node-version }}
run: |
npm install -g gscan
yarn add gscan || npm install -g gscan
yarn install
yarn build
yarn test:ci || yarn test
yarn test:ci
2 changes: 1 addition & 1 deletion assets/built/prism.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/built/screen.css

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions assets/js/prism.js

Large diffs are not rendered by default.

26 changes: 2 additions & 24 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {series, watch, src, dest, parallel} = require('gulp');
const pump = require('pump');
const tailwind = require("tailwindcss");
const concat = require('gulp-concat');
// const concat = require('gulp-concat');

// gulp plugins and utils
const livereload = require('gulp-livereload');
Expand Down Expand Up @@ -63,38 +63,16 @@ function js(done) {
], handleError(done));
}

function prism(done) {
pump([
src([
// pull in lib files first so our own code can depend on it
"node_modules/prismjs/prism.js",
"node_modules/prismjs/components/prism-*.min.js",
"node_modules/prismjs/plugins/line-numbers/prism-line-numbers.min.js",
"node_modules/prismjs/plugins/toolbar/prism-toolbar.min.js",
"node_modules/prismjs/plugins/show-language/prism-show-language.min.js",
"node_modules/prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"
], { sourcemaps: false }),
concat('prism.js'),
uglify(),
dest("assets/built/", { sourcemaps: "." }),
livereload(),
],
handleError(done)
);
}


const cssWatcher = () => watch('assets/css/**', css);
const jsWatcher = () => watch('assets/js/**', js);
const hbsWatcher = () => watch(['*.hbs', 'partials/**/*.hbs'], hbs);
const prismWatcher = () => watch('gulpfile.js', prism);
const watcher = parallel(
cssWatcher,
jsWatcher,
prismWatcher,
hbsWatcher
);
const build = series(css, js, prism);
const build = series(css, js);

exports.build = build;
exports.default = series(build, serve, watcher);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sredevopsorg-ghost-theme",
"description": "Ghost v5 Theme made for SREDevOps.org (https://sredevops.org) based on Tailwind CSS v3, responsive, dark color schema, SVG icons, sidebar + footer navgation, customized tags and recommendations pages.",
"demo": "https://sredevops.org",
"version": "1.1.2",
"version": "1.1.3",
"engines": {
"ghost": ">=5.0.0"
},
Expand Down

0 comments on commit 43516a0

Please sign in to comment.