Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MG-5 committed Oct 15, 2023
0 parents commit c16ef05
Show file tree
Hide file tree
Showing 258 changed files with 53,655 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
language: ruby
rvm:
# - 2.4.0
# - 2.5.5
- 2.6.3

env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true

notifications:
email: false

before_install:
# - gem update --system
- gem install bundler

script:
- bundle install
- bundle exec jekyll build

after_script:
- gem install type-on-strap
- gem install jekyll-theme-type-on-strap
- docker pull sylhare/type-on-strap

branches:
only:
- master
- /^v.*$/

jobs:
include:
- stage: gem release
rvm: 2.6.3
script: echo "Deploying to rubygems.org ..."
deploy:
provider: rubygems
gem: type-on-strap
api_key:
secure: DNJmBojaNJU0VFS2RE3Gy5CBnll1GXm7wtvxVMDfAqFNbCQdq2LR/v3LDNNm/ZEPMQfgdvlom8s5Pm26nnxbWFAAFcLTBD/cyJffvudgiCo3ONLkpm/PsVJiTyNbzZyb/XPE879S+LVtdKGlhLFSBaqUKfrhyRHT1W9LWrrjZMTQngUZCPlJmw6AsLvqT2x1CcBvVD2Q6tN8bOwq2blsDUtI6449ey1qWfgaERvM8KvF76aB32YQ7t8986NMkfHRDXPlgxm64pCc4kduBqAk9UHP5JAJzO4c3zEhX5Mb6Hc1CoxdgF3WSpmiN6HVVMaSC1byL4evocR+Enh5Gjc0VxEmIjCESpyheQG7YkkaadC7Lrvb18/qoSj0iDeB386k11XMiRN1dxu1CehPOkyQh5V5UEbZrm/9W9U/eQGgG1YoqicShcfxLDGeWRK4moLW8a8pvvBs+dduZyCWUgaC08S1u+HwvO8TpWcslr9/J05sRV4PAjk+u66+FVdILn0YWsbOKTezY/APTDfHnn/NQGZWXI4W5PMtf+KfPjL9kU0ouhqGpElGxrg2Hlw8kaPY3QrYLviVC7/DvWNWPGt9hmvcneuEg16zJTMoeNzckK5AUimyzvvjpVPVBh30T1YpZtcg+gFgesTHjyo/piFxEFX4ttYKoxvLMABONbniXcE=
on:
tags: true
repo: sylhare/Type-on-Strap
13 changes: 13 additions & 0 deletions .github/Docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# GitHub folder

> You don't need that folder for your GitHub page
You can delete this folder or add your own workflows in it.

## Structure

- [hooks](./hooks): custom git hooks for gulp task
- [workflows](./workflows): Workflows of this repository for the GitHub actions
- [config.yml](./config.yml): Config file for "request-info" bot
- [release-drafter.yml](./release-drafter.yml): Config file for "release-drafter" bot
- [stale.yml](./stale.yml): Config file for "stale" bot
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: 'sylhare'

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Question
about: Anything you'd like to ask for
title: ''
labels: question
assignees: ''

---

<!-- If applicable, add screenshots to your question -->
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- Thanks for your PR! -->
<!-- If the change is not compatible with GitHub page (https://github.com/github/pages-gem) it won't be merged 😢 -->

### Description
<!-- A brief explanation of what the PR is about -->

### Screenshot
<!-- Don't forget to provide screenshot if you change the layout of the theme -->
27 changes: 27 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration for request-info
# https://github.com/behaviorbot/request-info

# *OPTIONAL* Comment to reply with
requestInfoReplyComment: >
We would appreciate it if you could provide us with more info about this issue/pr!
# *OPTIONAL* default titles to check against for lack of descriptiveness (MUST BE ALL LOWERCASE)
requestInfoDefaultTitles:
- update readme.md
- updates

# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
requestInfoLabelToAdd: need-more-info

# *OPTIONAL* Require Pull Requests to contain more information than what is provided in the PR template (Will fail if the pull request's body is equal to the provided template)
checkPullRequestTemplate: true

# *OPTIONAL* Only warn about insufficient information on these events type (Keys must be lowercase. Valid values are 'issue' and 'pullRequest')
requestInfoOn:
pullRequest: true
issue: true

# *OPTIONAL* Add a list of people whose Issues/PRs will not be commented on (keys must be GitHub usernames)
requestInfoUserstoExclude:
- sylhare
- # the other users you wanna add here
11 changes: 11 additions & 0 deletions .github/hooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Git hooks

Git hooks are provided in `hooks/`. The pre-commit hook, when enabled, will check for non-staged assets before commit and abort if found any.

## Setup

`ln lib/hooks/pre-commit .git/hooks/pre-commit`

## Bypass

`git commit -n`
28 changes: 28 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
# Called by "git commit" with no arguments.
# The hook should run gulp to optimize assets.
# Will exit with non-zero status if it wants to stop the commit.

: << 'END' # Ancillary code to ensure environment before running gulp
# If it's on the right directory, proceed. Else, try to fix it. If fail, abort commit.
if [ ${PWD##*/} != "lib" ] ; then
cd lib || exit 1
fi
# If gulp is intalled and gulpfile.js is present, then proceed. Else, abort commit.
if ! [ -f "gulpfile.js" ] || ! command -v gulp; then
printf "gulpfile.js not found or gulp-cli not installed!\n"
exit 1
fi
END

# If there are non-staged assets, abort commit.
if git status --porcelain | grep -E '^(\?\?|AM|\nM).*assets/.*$' >/dev/null; then
printf "There are non-staged assets, be sure to run gulp before commiting changes!\n"
exit 1
fi

# Proceed with the commit.
exit 0

8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
question:
- '(?)'

bug:
- '(bug|issue|problem)'

enhancement:
- '(enhancement|feature)'
19 changes: 19 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bug'
- title: '🧰 Maintenance'
labels:
- 'devops'
- 'custom'
template: |
## What’s new:
$CHANGES
22 changes: 22 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 15

# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7

# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security

# Label to use when marking an issue as stale
staleLabel: wontfix

# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
42 changes: 42 additions & 0 deletions .github/workflows/gem-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Ruby Gem

on:
pull_request:
branches: [ master ]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [ '2.7', '3.0', '3.1' ]

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install
run: bundle install
- name: Build jekyll site
run: bundle exec jekyll build
- name: Build the gem
continue-on-error: true
run: |
gem build *.gemspec
echo `find . -name "*.gem" | tail -1 | awk -F"[/]" '{print $2}'`
- name: Gems
continue-on-error: true
run: |
gem update --system
gem install type-on-strap
gem install jekyll-theme-type-on-strap
- name: GPR
continue-on-error: true
run: |
gem install type-on-strap --version "2.4.4" --source "https://rubygems.pkg.github.com/sylhare"
27 changes: 27 additions & 0 deletions .github/workflows/jekyll-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Jekyll Build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the site in the jekyll/builder container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
- name: Install packages
continue-on-error: true
run: |
docker pull sylhare/type-on-strap
docker pull sylhare/jekyll
13 changes: 13 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Issue Labeler"
on:
issues:
types: [opened, edited]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@3.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/labeler.yml
54 changes: 54 additions & 0 deletions .github/workflows/publish-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish build

on:
workflow_dispatch:
push:
tags:
- v*

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up Ruby 3.1
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.0
- name: Install
run: bundle install
- name: Build jekyll site
run: bundle exec jekyll build
- name: Build the gem
continue-on-error: true
run: |
gem build *.gemspec
echo `find . -name "*.gem" | tail -1 | awk -F"[/]" '{print $2}'`
- name: Publish to GPR
continue-on-error: true
run: |
echo ${{ github.repository_owner }}
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
OWNER: ${{ github.repository_owner }}

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
wc -l $HOME/.gem/credentials
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
Loading

0 comments on commit c16ef05

Please sign in to comment.