Skip to content

Commit 3a7d6e4

Browse files
committed
refactor: remove Rake, migrate workflows and tooling to mise
1 parent ceb9b04 commit 3a7d6e4

File tree

9 files changed

+55
-97
lines changed

9 files changed

+55
-97
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on:
1212
workflow_dispatch:
1313

1414
env:
15-
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
16-
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
17-
# AWS_DEFAULT_REGION: us-east-1
1815
working_dir: terragrunt/live/website
1916

2017
concurrency:
@@ -71,7 +68,7 @@ jobs:
7168
- name: Build Jekyll project
7269
run: |
7370
bundle install
74-
bundle exec rake build
71+
mise build
7572
7673
- name: Validate Outputs
7774
run: |

.github/workflows/test.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,22 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v6
1717

18-
- name: Set up Ruby
19-
uses: ruby/setup-ruby@v1
20-
with:
21-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18+
- name: Install mise
19+
uses: jdx/mise-action@v3
20+
21+
- name: Install tools
22+
run: mise install
23+
24+
- name: Install Ruby gems
25+
run: bundle install
2226

2327
- name: Setup TFLint
2428
uses: terraform-linters/setup-tflint@v6
2529
with:
2630
tflint_version: v0.50.3
2731

2832
- name: Run linters
29-
run: bundle exec rake lint
30-
# needed to add new pages
31-
continue-on-error: true
32-
33+
run: mise lint
3334

3435
- uses: actions/setup-node@v6
3536
with:

.rubocop.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
plugins:
2-
- rubocop-rake
31
AllCops:
42
NewCops: enable

Gemfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ gem 'csv'
88
gem 'faraday'
99
gem 'html-proofer'
1010
gem 'jekyll'
11-
gem 'rake'
1211
gem 'rubocop', require: false
13-
gem 'rubocop-rake'

Gemfile.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,6 @@ GEM
179179
rubocop-ast (1.49.0)
180180
parser (>= 3.3.7.2)
181181
prism (~> 1.7)
182-
rubocop-rake (0.7.1)
183-
lint_roller (~> 1.1)
184-
rubocop (>= 1.72.1)
185182
ruby-progressbar (1.13.0)
186183
ruby-rc4 (0.1.5)
187184
safe_yaml (1.0.5)
@@ -237,9 +234,7 @@ DEPENDENCIES
237234
faraday
238235
html-proofer
239236
jekyll
240-
rake
241237
rubocop
242-
rubocop-rake
243238

244239
RUBY VERSION
245240
ruby 3.3.9p170

README.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,31 @@
11
# colorcop-website
22

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

7-
## Installation
8-
9-
This project uses mise to configure the development environment. Install it and then run `mise install`.
10-
11-
Install the required ruby gems:
6+
A static website for the ColorCop project, built with Jekyll and managed using mise for consistent tooling and reproducible development environments.
127

13-
```
14-
bundle install
15-
```
8+
---
169

17-
## Running locally
10+
## Installation
1811

19-
```
20-
jekyll serve
21-
```
12+
This project uses mise to configure the development environment.
2213

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

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

27-
```
28-
rake test
21+
```sh
22+
mise serve
2923
```
3024

3125
## Running linters
3226

33-
```
34-
rake lint
27+
```sh
28+
mise lint
3529
```
3630

3731
## Deploy

Rakefile

Lines changed: 0 additions & 52 deletions
This file was deleted.

_config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ github_username: colorcop
1111
# Build settings
1212
markdown: kramdown
1313

14-
# exclude some directories and files that don't belong in the website
14+
# exclude some directories and files that shouldn't be published
1515
exclude:
1616
- terraform
1717
- terragrunt
18-
- Rakefile
1918
- README.md
2019
- package*
2120
- playwright*

mise.toml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
[tools]
2-
ruby = '3.3.9'
3-
terragrunt = '0.86.0'
4-
opentofu = '1.6.2'
2+
ruby = "3.3.9"
3+
terragrunt = "0.86.0"
4+
# Use a direct tarball URL so mise doesn't call the GitHub API
5+
opentofu = { version = "1.6.2", url = "https://github.com/opentofu/opentofu/releases/download/v1.6.2/opentofu_1.6.2_linux_amd64.tar.gz" }
6+
7+
[tasks.build]
8+
description = "Build the Jekyll project"
9+
run = "bundle exec jekyll build"
10+
11+
[tasks.lint]
12+
description = "Run all linters"
13+
depends = ["build"]
14+
run = [
15+
# Ruby lint
16+
"bundle exec rubocop",
17+
18+
# Terraform lint
19+
"tflint --init",
20+
"tflint --chdir terraform/website/ -c ../../.tflint.hcl",
21+
22+
# HTML linting
23+
"bundle exec htmlproofer ./_site --check-external-hash"
24+
]
25+
26+
[tasks.serve]
27+
description = "Serve the Jekyll project with live reload"
28+
run = "bundle exec jekyll serve --livereload --watch --port 4000 --host 127.0.0.1"
29+
30+
[tasks.default]
31+
description = "Default task"
32+
depends = ["test", "lint"]

0 commit comments

Comments
 (0)