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
5 changes: 1 addition & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
workflow_dispatch:

env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_DEFAULT_REGION: us-east-1
working_dir: terragrunt/live/website

concurrency:
Expand Down Expand Up @@ -71,7 +68,7 @@ jobs:
- name: Build Jekyll project
run: |
bundle install
bundle exec rake build
mise build

- name: Validate Outputs
run: |
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install mise
uses: jdx/mise-action@v3

- name: Install tools
run: mise install

- name: Install Ruby gems
run: bundle install

- name: Setup TFLint
uses: terraform-linters/setup-tflint@v6
with:
tflint_version: v0.50.3

- name: Run linters
run: bundle exec rake lint
# needed to add new pages
continue-on-error: true

run: mise lint

- uses: actions/setup-node@v6
with:
Expand Down
2 changes: 0 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
plugins:
- rubocop-rake
AllCops:
NewCops: enable
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ gem 'csv'
gem 'faraday'
gem 'html-proofer'
gem 'jekyll'
gem 'rake'
gem 'rubocop', require: false
gem 'rubocop-rake'
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ GEM
rubocop-ast (1.49.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
safe_yaml (1.0.5)
Expand Down Expand Up @@ -237,9 +234,7 @@ DEPENDENCIES
faraday
html-proofer
jekyll
rake
rubocop
rubocop-rake

RUBY VERSION
ruby 3.3.9p170
Expand Down
32 changes: 13 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
# colorcop-website

[![GitHub Actions Status](https://github.com/ColorCop/colorcop-website/workflows/Test/badge.svg)](https://github.com/ColorCop/colorcop-website/actions)
![Powered by Rake](https://img.shields.io/badge/powered_by-rake-blue?logo=ruby)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Installation

This project uses mise to configure the development environment. Install it and then run `mise install`.

Install the required ruby gems:
A static website for the ColorCop project, built with Jekyll and managed using mise for consistent tooling and reproducible development environments.

```
bundle install
```
---

## Running locally
## Installation

```
jekyll serve
```
This project uses mise to configure the development environment.

## Running tests
- Install [mise](https://mise.jdx.dev/getting-started.html)
- Run `mise trust` and answer yes.
- Run `mise install` to install the required tools
- Run `bundle install`

There is a rake task that runs [Playwright](https://github.com/microsoft/playwright) tests.
## Running locally

```
rake test
```sh
mise serve
```

## Running linters

```
rake lint
```sh
mise lint
```

## Deploy
Expand Down
52 changes: 0 additions & 52 deletions Rakefile

This file was deleted.

3 changes: 1 addition & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ github_username: colorcop
# Build settings
markdown: kramdown

# exclude some directories and files that don't belong in the website
# exclude some directories and files that shouldn't be published
exclude:
- terraform
- terragrunt
- Rakefile
- README.md
- package*
- playwright*
Expand Down
34 changes: 31 additions & 3 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
[tools]
ruby = '3.3.9'
terragrunt = '0.86.0'
opentofu = '1.6.2'
ruby = "3.3.9"
terragrunt = "0.86.0"
# Use a direct tarball URL so mise doesn't call the GitHub API
opentofu = { version = "1.6.2", url = "https://github.com/opentofu/opentofu/releases/download/v1.6.2/opentofu_1.6.2_linux_amd64.tar.gz" }

[tasks.build]
description = "Build the Jekyll project"
run = "bundle exec jekyll build"

[tasks.lint]
description = "Run all linters"
depends = ["build"]
run = [
# Ruby lint
"bundle exec rubocop",

# Terraform lint
"tflint --init",
"tflint --chdir terraform/website/ -c ../../.tflint.hcl",

# HTML linting
"bundle exec htmlproofer ./_site --check-external-hash"
]

[tasks.serve]
description = "Serve the Jekyll project with live reload"
run = "bundle exec jekyll serve --livereload --watch --port 4000 --host 127.0.0.1"

[tasks.default]
description = "Default task"
depends = ["test", "lint"]