Skip to content

Commit 1e9fec3

Browse files
committed
Initial commit
new file: .editorconfig new file: .gitattributes new file: .github/.markdownlint.yaml new file: .github/dependabot.yml new file: .github/workflows-disabled/assessor.yml new file: .github/workflows-disabled/wiki-sync.yml new file: .github/workflows-disabled/wiki-zi.yml new file: .github/workflows-disabled/wiki-zsh.yml new file: .github/workflows/code.yml new file: .github/workflows/push-code.yml new file: .github/workflows/trunk-check.yml new file: .gitignore new file: .gitmodules new file: .markdownlint.yaml new file: .trunk/bin/trunk new file: .trunk/trunk.yaml new file: .vscode/settings.json new file: LICENSE new file: code/Makefile
0 parents  commit 1e9fec3

File tree

105 files changed

+35244
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+35244
-0
lines changed

.editorconfig

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# # Space or Tabs?
2+
# https://stackoverflow.com/questions/35649847/objective-reasons-for-using-spaces-instead-of-tabs-for-indentation
3+
# https://stackoverflow.com/questions/12093748/how-to-use-tabs-instead-of-spaces-in-a-shell-script
4+
#
5+
# Note: VIM users should use alternate marks [[[ and ]]] as the original ones can confuse nested substitutions, e.g.: ${${${VAR}}}
6+
#
7+
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
8+
# vim: ft=zsh sw=2 ts=2 et
9+
10+
root = true
11+
12+
[*]
13+
charset = utf-8
14+
end_of_line = lf
15+
insert_final_newline = true
16+
trim_trailing_whitespace = true
17+
18+
[*.{md,rst}]
19+
trim_trailing_whitespace = false
20+
21+
[*.{sh,bash,zsh,fish}]
22+
indent_style = space
23+
indent_size = 2
24+
tab_width = 2
25+
26+
[Makefile]
27+
indent_style = tab
28+
indent_size = 4
29+
30+
[*.{xml,json}]
31+
indent_style = space
32+
indent_size = 2
33+
34+
[*.{css,less}]
35+
indent_style = space
36+
indent_size = 2
37+
38+
[*.{js,jsx,html,sass}]
39+
indent_style = tab
40+
indent_size = 4
41+
42+
[*.{py,rb}]
43+
indent_style = space
44+
indent_size = 4
45+
46+
[*.{go,java,scala,groovy,kotlin}]
47+
indent_style = tab
48+
indent_size = 4
49+
50+
[*.{yml,yaml}]
51+
indent_style = space
52+
indent_size = 2
53+
tab_width = 2
54+
55+
[CHANGELOG.md]
56+
indent_style = tab
57+
indent_size = 4

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto
2+
*.md diff=markdown
3+
*.zsh text eol=lf diff=zsh

.github/.markdownlint.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Autoformatter friendly markdownlint config (all formatting rules disabled)
2+
default: true
3+
blank_lines: false
4+
bullet: false
5+
html: false
6+
indentation: false
7+
line_length: false
8+
spaces: false
9+
url: false
10+
whitespace: false
11+
MD041: false

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "daily"
9+
- package-ecosystem: "gitsubmodule"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 🏅 Plugin Assessor
2+
3+
on:
4+
schedule:
5+
- cron: "30 03 01 */3 *"
6+
workflow_dispatch:
7+
8+
env:
9+
TERM: xterm-256color
10+
11+
jobs:
12+
run-assessor:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: ⤵️ Check out code from GitHub
16+
uses: actions/checkout@v3
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
submodules: recursive
20+
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
21+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
22+
- name: 📦 Dependencies
23+
run: sudo apt-get update && sudo apt-get upgrade -yq && sudo apt-get install zsh -yq
24+
- name: 🚀 Run Assessor
25+
run: |
26+
./render.zsh
27+
working-directory: docs/zsh-plugins-commit-top
28+
- name: ☑️ Commit files
29+
run: |
30+
cp -vf docs/zsh-plugins-commit-top/README.md wiki/zi/06-knowledge-base/Zsh-Plugins-Commit-TOP.md
31+
git config --local user.email "[email protected]"
32+
git config --local user.name " digital-teams [bot]"
33+
git add docs/zsh-plugins-commit-top/README.md wiki/zi/06-knowledge-base/Zsh-Plugins-Commit-TOP.md
34+
git commit --allow-empty -m "Zsh Plugins commit update" -a
35+
- name: 📤 Push changes
36+
uses: ad-m/github-push-action@master
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
branch: ${{ github.ref }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: 📖 Wiki Sync
3+
4+
on:
5+
push:
6+
paths:
7+
- "docs/wiki/**"
8+
repository_dispatch:
9+
types: [docs]
10+
gollum:
11+
12+
env:
13+
GIT_AUTHOR_NAME: ZI Actionbot
14+
GIT_AUTHOR_EMAIL: [email protected]
15+
16+
jobs:
17+
job-sync-docs-to-wiki:
18+
runs-on: ubuntu-latest
19+
if: github.event_name != 'gollum'
20+
steps:
21+
- name: ⤵️ Check out code from GitHub
22+
uses: actions/checkout@v3
23+
- name: 📤 Sync Docs to Wiki
24+
uses: newrelic/wiki-sync-action@master
25+
with:
26+
source: docs/wiki
27+
destination: wiki
28+
token: ${{ secrets.GH_PAT }}
29+
gitAuthorName: ${{ env.GIT_AUTHOR_NAME }}
30+
gitAuthorEmail: ${{ env.GIT_AUTHOR_EMAIL }}
31+
32+
job-sync-wiki-to-docs:
33+
runs-on: ubuntu-latest
34+
if: github.event_name == 'gollum'
35+
steps:
36+
- name: ⤵️ Check out code from GitHub
37+
uses: actions/checkout@v3
38+
with:
39+
token: ${{ secrets.GH_PAT }}
40+
ref: develop
41+
- name: 📥 Sync Wiki to Docs
42+
uses: newrelic/wiki-sync-action@master
43+
with:
44+
source: wiki
45+
destination: docs/wiki
46+
token: ${{ secrets.GH_PAT }}
47+
gitAuthorName: ${{ env.GIT_AUTHOR_NAME }}
48+
gitAuthorEmail: ${{ env.GIT_AUTHOR_EMAIL }}
49+
branch: develop
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: 📖 ZI
3+
4+
on:
5+
push:
6+
paths:
7+
- "wiki/zi/**"
8+
workflow_dispatch:
9+
10+
jobs:
11+
deploy-wiki:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: ⤵️ Check out code from GitHub
15+
uses: actions/checkout@v3
16+
- name: 🏗 Prepare wiki
17+
run: make -C wiki/zsh to-wiki-pages
18+
- name: 📤 Sync Docs to Wiki
19+
uses: Andrew-Chen-Wang/github-wiki-action@v3
20+
env:
21+
WIKI_DIR: wiki/zi/
22+
REPO: z-shell/zi
23+
GH_TOKEN: ${{ secrets.GH_PAT }}
24+
GH_MAIL: ${{ secrets.GH_MAIL }}
25+
GH_NAME: ${{ github.repository_owner }}
26+
#EXCLUDED_FILES: "wiki/zi/drafts/"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: 📖 Zsh
3+
4+
on:
5+
push:
6+
paths:
7+
- "wiki/zsh/**"
8+
pull_request:
9+
paths:
10+
- "wiki/zsh/**"
11+
workflow_dispatch:
12+
13+
jobs:
14+
generate-documentation:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: ⤵️ Check out code from GitHub
18+
uses: actions/checkout@v3
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
submodules: recursive
22+
- name: ⚡ Install zsdoc
23+
run: |
24+
sudo apt-get install -y zsh tree
25+
sudo make -C lib/zsdoc install
26+
- name: 💎 Setup Ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: 3.0
30+
bundler-cache: true
31+
- name: 📝 Install asciidoctor-pdf and rouge
32+
run: |
33+
gem install asciidoctor-pdf rouge
34+
- uses: actions/checkout@v3
35+
with:
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
- name: ♻️ Generate Documentation
38+
run: |
39+
make -C wiki/zsh clean
40+
make -C wiki/zsh all
41+
- name: ♻️ Compress the Zsh Documentation
42+
run: tar cvzf zsh-wiki.tar.gz wiki/zsh
43+
- name: Upload zsh-wiki.tar.gz
44+
uses: actions/upload-artifact@v3
45+
with:
46+
name: ♻️ Zsh Documentation
47+
path: zsh-wiki.tar.gz
48+
- uses: actions/checkout@v3
49+
- name: ♻️ Prepare GitHub Pages
50+
run: |
51+
make -C wiki/zsh prep-gh-pages
52+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
53+
git config --local user.name "github-actions[bot]"
54+
git add code/zsh
55+
git commit --allow-empty -m "Zsh Documentation Update" -a
56+
- name: 📤 Push changes
57+
uses: ad-m/github-push-action@master
58+
with:
59+
github_token: ${{ secrets.GITHUB_TOKEN }}
60+
branch: ${{ github.ref }}

.github/workflows/code.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: 📖 Code
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "30 4 * * 4"
7+
8+
jobs:
9+
deps:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
submodules: recursive
16+
- name: ⚡ Install zsdoc
17+
run: |
18+
sudo apt-get install -y zsh tree
19+
sudo make -C lib/zsdoc install
20+
- name: 💎 Setup Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: 3.0
24+
bundler-cache: true
25+
- name: 📝 Install asciidoctor-pdf and rouge
26+
run: |
27+
gem install asciidoctor-pdf rouge
28+
- name: ♻️ Generate Code
29+
run: |
30+
make -C code
31+
make -C code clean
32+
- name: ⭕ Trunk Check
33+
run: ./.trunk/bin/trunk check --fix code
34+
- name: 🏗 Compress code documentation
35+
run: tar cvzf code.tar.gz code
36+
- name: 📤 Upload code.tar.gz
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: code documentation
40+
path: code.tar.gz
41+
- name: "🆗 Commit"
42+
uses: z-shell/.github/actions/commit@main
43+
with:
44+
commitMessage: Code Documentation ${{ github.sha }}
45+
workDir: code
46+
commitUserName: digital-teams[bot]
47+
commitUserEmail: [email protected]

.github/workflows/push-code.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: 🚀 Deploy Code to GH Pages
3+
4+
on:
5+
workflow_run:
6+
workflows:
7+
- "📖 Code"
8+
types:
9+
- completed
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
steps:
16+
- name: ⤵️ Check out code from GitHub
17+
uses: actions/checkout@v3
18+
- name: ♻️ Prepare
19+
run: |
20+
mkdir -p gh-pages/code gh-pages/zsh
21+
cp -vrf code/zsdoc/html gh-pages/code/
22+
- name: 🚀 Deploy to GitHub Pages
23+
uses: peaceiris/actions-gh-pages@v3
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_branch: gh-pages
27+
publish_dir: ./gh-pages
28+
allow_empty_commit: true
29+
keep_files: true
30+
user_name: digital-teams[bot]
31+
user_email: [email protected]

0 commit comments

Comments
 (0)