Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# direnv configuration
# This file automatically loads environment variables from .env
# Install direnv: https://direnv.net/

# Load .env file if it exists
dotenv_if_exists

# Optional: Add any custom environment setup here
# export PATH_add bin
36 changes: 36 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
extends: 'airbnb-base',
globals: {
window: true,
Breakpoints: true,
Pace: true,
FontAwesome: true,
breakpoints: true,
fontawesome: true,
document: true,
},
env: {
es6: true,
jquery: true,
node: true,
browser: true,
commonjs: true,
},
plugins: [
'import',
],
rules: {
'max-len': ['error', 180, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'func-names': ['error', 'never'],
'import/no-unresolved': ['error', {
ignore: ['fontawesome', 'breakpoints'],
}],
},
};
36 changes: 0 additions & 36 deletions .eslintrc.json

This file was deleted.

48 changes: 28 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ on:

jobs:
build:

runs-on: ubuntu-latest
env:
SITE_HOST: ${{ vars.SITE_HOST }}

steps:
- uses: actions/checkout@v1

# ----------------------------------------------------Ruby

# ---------------------------------------------------------------
# Ruby
# ---------------------------------------------------------------
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
ruby-version: 3.4.3
- name: Ruby Version
run: |
ruby -v
Expand All @@ -29,41 +30,48 @@ jobs:
- name: Test Ruby Dependencies
run: |
bundle exec rake -T

# ----------------------------------------------------Node

# ---------------------------------------------------------------
# Javascript
# ---------------------------------------------------------------
- name: Install Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
version: 10.16.3
node-version: 22.6.0
- name: Node Version
run: |
node --version
- name: Setup Node Dependencies
- name: Install Yarn
run: |
npm install

# ----------------------------------------------------Webpack

npm install --global yarn
- name: Yarn Version
run: |
yarn --version
- name: Install Dependencies
run: |
yarn install
# ---------------------------------------------------------------
# Webpack
# ---------------------------------------------------------------
- name: Build Webpack File
run: |
bundle exec rake webpack:build:production

- name: Build Site
run: |
export TERM=xterm
bundle exec middleman build -e production --verbose

# ----------------------------------------------------Quality

bundle exec middleman build -e production --verbose
# ---------------------------------------------------------------
# Quality
# ---------------------------------------------------------------
- name: Rubocop
run: |
bundle exec rubocop

- name: ESLint
run: |
npm run lintjs
yarn run lint:js

- name: StyleLint
run: |
npm run lintcss
yarn run lint:css
59 changes: 41 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
name: Deploy Static Site


on:
pull_request:
types: [closed]
branches:
- main

# on:
# push:
# branches:
# - main

jobs:
deploy:
runs-on: ubuntu-latest
env:
SITE_HOST: ${{ vars.SITE_HOST }}

steps:
- uses: actions/checkout@v1
if: github.event.pull_request.merged == true

# ----------------------------------------------------Ruby

# ---------------------------------------------------------------
# Ruby
# ---------------------------------------------------------------
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
ruby-version: 3.4.3
if: github.event.pull_request.merged == true

- name: Ruby Version
Expand All @@ -33,26 +41,41 @@ jobs:
bundle install --jobs 4 --retry 3
if: github.event.pull_request.merged == true

# ----------------------------------------------------Node

- name: Test Ruby Dependencies
run: |
bundle exec rake -T
if: github.event.pull_request.merged == true
# ---------------------------------------------------------------
# Javascript
# ---------------------------------------------------------------
- name: Install Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
version: 10.16.3
node-version: 22.6.0
if: github.event.pull_request.merged == true

- name: Node Version
run: |
node --version
if: github.event.pull_request.merged == true

- name: Setup Node Dependencies
- name: Install Yarn
run: |
npm install
npm install --global yarn
if: github.event.pull_request.merged == true

# ----------------------------------------------------Webpack
- name: Yarn Version
run: |
yarn --version
if: github.event.pull_request.merged == true

- name: Install Dependencies
run: |
yarn install
if: github.event.pull_request.merged == true
# ---------------------------------------------------------------
# Webpack
# ---------------------------------------------------------------
- name: Build Webpack File
run: |
bundle exec rake webpack:build:production
Expand All @@ -63,13 +86,13 @@ jobs:
export TERM=xterm
bundle exec middleman build -e production --verbose
if: github.event.pull_request.merged == true

# ----------------------------------------------------Deploy

- name: Deploy to Github Pages
# ---------------------------------------------------------------
# Deploy
# ---------------------------------------------------------------
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./build
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./build
if: github.event.pull_request.merged == true && success()
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ webpack.config.js
.vscode
.idea

###############################################################################################
# Environment variables
###############################################################################################
.env
.env.local
.envrc.local

###############################################################################################
# Ignore all logfiles, tempfiles, and databases.
###############################################################################################
*.log
*.sql
*.sqlite
/tmp
!tmp/.keep
/archive

###############################################################################################
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.16.3
v22.6.0
16 changes: 12 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
# TODO - FIX COP
# rubocop:enable all

inherit_from:
- .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rake

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.4.3
DisplayStyleGuide: false
NewCops: enable
Exclude:
- '___v3_construction_site__/**/*'
- 'backup/**/*'
- 'build/**/*'
- 'vendor/**/*'
Expand All @@ -21,8 +30,7 @@ AllCops:
- 'tmp.rb'
- 'scratch.rb'

# Disable documentation cops
Documentation:
Style/Documentation:
Enabled: false

Layout/MultilineOperationIndentation:
Expand All @@ -34,7 +42,7 @@ Metrics/ClassLength:
Metrics/MethodLength:
Max: 16

Metrics/LineLength:
Layout/LineLength:
Max: 180
Exclude:
- 'lib/tasks/*'
Expand Down
7 changes: 7 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-08-11 14:30:17 UTC using RuboCop version 1.65.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.2
3.4.3
16 changes: 11 additions & 5 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"extends": "stylelint-config-standard",
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended-scss"
],
"plugins": [
"stylelint-scss"
],
"rules": {
"indentation": null,
"at-rule-no-unknown": [true, {
"ignoreAtRules": ["function", "if", "each", "include", "mixin", "for", "elseif", "return"]
}]
"scss/at-rule-no-unknown": [true, {
"ignoreAtRules": ["mixin", "extend", "content", "function", "if", "each", "include", "mixin", "for", "elseif", "return"]
}],
"scss/no-global-function-names": null,
"import-notation": null,
"no-invalid-position-at-import-rule": null,
"at-rule-no-unknown": null
}
}
Loading