Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: timothystewart6
patreon: technotim
Empty file.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "bundler" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
rebase-strategy: "auto"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
Empty file.
66 changes: 15 additions & 51 deletions .github/workflows/pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,37 @@
name: "Build and Deploy"
name: 'Build & Release'
on:
push:
branches:
- main
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
build-release:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# submodules: true
# If using the 'assets' git submodule from Chirpy Starter, uncomment above
# (See: https://github.com/cotes2020/chirpy-starter/tree/main/assets)
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
with:
fetch-depth: 0 # for posts's lastmod

- name: Setup Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa #1.115.3
with:
ruby-version: 3.3
ruby-version: 2.7
bundler-cache: true

- name: Build site
run: bundle exec jekyll b -d "_site${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: "production"

- name: Test site
- name: Check baseurl
run: |
bundle exec htmlproofer _site \
\-\-disable-external \
\-\-ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"

- name: Upload site artifact
uses: actions/upload-pages-artifact@v3
with:
path: "_site${{ steps.pages.outputs.base_path }}"
baseurl="$(grep '^baseurl:' _config.yml | sed "s/.*: *//;s/['\"]//g;s/#.*//")"
if [[ -n $baseurl ]]; then
echo "BASE_URL=$baseurl" >> $GITHUB_ENV
fi

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Deploy
run: bash tools/deploy.sh
Empty file.
30 changes: 30 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Pull Request'
on:
pull_request:
branches:
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE

jobs:
pull-request:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2

with:
fetch-depth: 0 # for posts's lastmod

- name: Setup Ruby
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa # 1.115.3
with:
ruby-version: 2.7
bundler-cache: true

- name: Test Site
run: bash tools/deploy.sh --dry-run
Empty file.
32 changes: 32 additions & 0 deletions .github/workflows/push-remote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'push-remote'

on:
push:
branches:
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE

jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2
with:
fetch-depth: 0 # for posts's lastmod

- name: Mirror + trigger CI
uses: SvanBoxel/gitlab-mirror-and-ci-action@871fb56ab2be794ca4df43e81cd03236ad8fba62 # 0.3+
with:
args: 'https://gitlab.com/${{ secrets.GITLAB_PROJECT_ID }}'
env:
FORCE_PUSH: "true"
GITLAB_HOSTNAME: ${{ secrets.GITLAB_HOSTNAME }}
GITLAB_USERNAME: ${{ secrets.GITLAB_USERNAME }}
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Empty file.
52 changes: 35 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
# Bundler cache
.bundle
vendor
Gemfile.lock
.DS_Store
node_modules
./public
.tmp
.idea
.log
dist
docs
npm-debug.log
.nyc_output
coverage
cassettes
yarn-error.log
.compiled

# Jekyll cache
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
yarn*
.bundle
!.travis.yml

# hidden files
.*
!.git*
!.editorconfig
!.nojekyll
!.travis.yml

# bundler cache
_site
vendor

# RubyGems
# rubygem
*.gem

# NPM dependencies
# npm dependencies
node_modules
package-lock.json

# IDE configurations
.idea
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
!.vscode/tasks.json

# Misc
_sass/dist
assets/js/dist
!.husky
!.commitlintrc.json
!.versionrc.json
Empty file added .gitignore:Zone.Identifier
Empty file.
59 changes: 59 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
stages:
- test
- docker
- deploy

variables:
KUBECONFIG: .kube/config
JEKYLL_ENV: production
GIT_STRATEGY: clone
GIT_DEPTH: 0

cache: &global_cache
key: $CI_PROJECT_NAME
paths:
- vendor/ruby
policy: pull-push

build:
image: ruby:2.7
stage: test
artifacts:
paths:
- _site
expire_in: 1 week
cache:
<<: *global_cache
retry: 2
script:
- gem install bundler
- bundle config set --local path 'vendor/ruby'
- bundle install
- JEKYLL_ENV=production bundle exec jekyll b

docker_image_build_release:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
cache: []
stage: docker
retry: 2
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:latest

deploy:
image:
name: bitnami/kubectl:latest
entrypoint: [""]
cache: []
stage: deploy
retry: 2
before_script:
- sed -ie "s/deploy-date-value/$(date)/g" kubernetes/deployment.yaml
- sed -ie "s|registry-value|$CI_REGISTRY_IMAGE|g" kubernetes/deployment.yaml
- mkdir -p .kube/ && touch .kube/config
- echo ${KUBERNETES_EXTERNAL_CLUSTER} | base64 -d -i > ${KUBECONFIG}
script:
- kubectl apply -f kubernetes
Empty file added .gitlab-ci.yml:Zone.Identifier
Empty file.
Empty file added .gitmodules:Zone.Identifier
Empty file.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:stable-alpine

COPY _site /usr/share/nginx/html
Empty file added Dockerfile:Zone.Identifier
Empty file.
18 changes: 13 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@

source "https://rubygems.org"

gem "jekyll-theme-chirpy", "~> 7.1", ">= 7.1.1"
gem "jekyll-theme-chirpy", "~> 5.3", ">= 5.3.2"

gem "html-proofer", "~> 5.0", group: :test
group :test do
gem "html-proofer", "~> 3.19"
end

platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
gem "tzinfo", "~> 2.0"
gem "tzinfo-data"
end

gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform?

# Jekyll <= 4.2.0 compatibility with Ruby 3.0
gem "webrick", "~> 1.8"
Loading