Skip to content

Commit ab5eca5

Browse files
committed
Adding to GitHub
0 parents  commit ab5eca5

26 files changed

+3848
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ko_fi: cssnr

.github/workflows/lint.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: "Lint"
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [master]
7+
push:
8+
branches: [master]
9+
10+
jobs:
11+
lint:
12+
name: "Lint"
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}
16+
17+
steps:
18+
- name: "Checkout"
19+
uses: actions/checkout@v4
20+
21+
- name: "Setup Node 22"
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
#cache: npm
26+
27+
- name: "Install"
28+
run: |
29+
npm ci
30+
31+
- name: "Build"
32+
if: ${{ !cancelled() }}
33+
run: |
34+
npm run build
35+
36+
#- name: "ESLint"
37+
# if: ${{ !cancelled() }}
38+
# run: |
39+
# npm run lint
40+
41+
- name: "Prettier"
42+
if: ${{ !cancelled() }}
43+
run: |
44+
npm run prettier
45+
46+
- name: "Yamllint"
47+
if: ${{ !cancelled() }}
48+
env:
49+
CONFIG: "{extends: relaxed, ignore: [node_modules/], rules: {line-length: {max: 119}}}"
50+
run: |
51+
echo "::group::List Files"
52+
yamllint -d '${{ env.CONFIG }}' --list-files .
53+
echo "::endgroup::"
54+
yamllint -d '${{ env.CONFIG }}' .
55+
56+
- name: "Actionlint"
57+
if: ${{ !cancelled() }}
58+
run: |
59+
echo "::group::Download"
60+
loc=$(curl -sI https://github.com/rhysd/actionlint/releases/latest | grep -i '^location:')
61+
echo "loc: ${loc}"
62+
tag=$(echo "${loc}" | sed -E 's|.*/tag/v?(.*)|\1|' | tr -d '\t\r\n')
63+
echo "tag: ${tag}"
64+
url="https://github.com/rhysd/actionlint/releases/latest/download/actionlint_${tag}_linux_amd64.tar.gz"
65+
echo "url: ${url}"
66+
curl -sL "${url}" | tar xz -C "${RUNNER_TEMP}" actionlint
67+
file "${RUNNER_TEMP}/actionlint"
68+
"${RUNNER_TEMP}/actionlint" --version
69+
echo "::endgroup::"
70+
"${RUNNER_TEMP}/actionlint" -color -verbose -shellcheck= -pyflakes=

.github/workflows/pages.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: "Pages"
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
paths:
8+
- "docs/**"
9+
- ".vitepress/**"
10+
- "package.json"
11+
- ".github/workflows/pages.yaml"
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
build:
25+
name: "Build"
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 5
28+
29+
steps:
30+
- name: "Checkout"
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: "Setup Node 22"
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 22
39+
cache: npm
40+
41+
- name: "Configure Pages"
42+
uses: actions/configure-pages@v5
43+
44+
- name: "Install Dependencies"
45+
run: |
46+
npm ci
47+
48+
- name: "Build Documentation"
49+
run: npm run build
50+
51+
- name: "Upload Pages Artifact"
52+
uses: actions/upload-pages-artifact@v3
53+
with:
54+
path: .vitepress/dist
55+
56+
deploy:
57+
name: "Deploy"
58+
runs-on: ubuntu-latest
59+
timeout-minutes: 5
60+
needs: build
61+
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
65+
66+
steps:
67+
- name: "Deploy Pages"
68+
id: deployment
69+
uses: actions/deploy-pages@v4
70+
71+
- name: "Send Release Notification"
72+
continue-on-error: true
73+
uses: sarisia/actions-status-discord@v1
74+
with:
75+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.idea/
2+
*.iml
3+
.vscode/
4+
**/dist/
5+
build/
6+
node_modules/
7+
.vitepress/cache

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
.vscode/
3+
dist/
4+
node_modules/
5+
package-lock.json

.prettierrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": false,
4+
"singleQuote": true,
5+
"printWidth": 110,
6+
"overrides": [
7+
{
8+
"files": ["**/*.html", "**/*.yaml", "**/*.yml"],
9+
"options": {
10+
"singleQuote": false
11+
}
12+
},
13+
{
14+
"files": ["**/*.js", "**/*.css", "**/*.scss"],
15+
"options": {
16+
"tabWidth": 4
17+
}
18+
}
19+
]
20+
}

.vitepress/config.mts

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
import { defineConfig } from 'vitepress'
2+
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'
3+
4+
const settings = {
5+
siteTitle: 'Docker Deploy', // For Site Sidebar
6+
title: 'Docker Stack Deploy Action', // For Actual Title
7+
name: 'Deploy to Docker from GitHub Actions', // For Meta Tag
8+
description: {
9+
short:
10+
'Easily Deploy a Docker Swarm or Compose Stack File to a Remote Host over SSH from the Actions Workspace.',
11+
long: 'Easily Deploy a Docker Swarm Stack or Compose Stack File to a Remote Host over SSH with Keyfile or Password Authentication from the Actions Workspace.',
12+
},
13+
image: '/images/logo/logo512.png',
14+
color: '#0064FC',
15+
docs_repo: 'https://github.com/cssnr/stack-deploy-docs',
16+
source_repo: 'https://github.com/cssnr/stack-deploy-action',
17+
actions_url: 'https://github.com/marketplace/actions/docker-stack-deploy',
18+
}
19+
20+
// https://vitepress.dev/reference/site-config
21+
// noinspection JSUnusedGlobalSymbols
22+
export default defineConfig({
23+
srcDir: './docs',
24+
// base: '/path/',
25+
vite: {
26+
server: {
27+
allowedHosts: true,
28+
},
29+
plugins: [
30+
groupIconVitePlugin({
31+
customIcon: {
32+
git: 'vscode-icons:file-type-git',
33+
},
34+
}),
35+
],
36+
},
37+
markdown: {
38+
config(md) {
39+
md.use(groupIconMdPlugin)
40+
},
41+
},
42+
43+
title: settings.title,
44+
description: settings.description.short,
45+
head: [
46+
['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
47+
['link', { rel: 'apple-touch-icon', type: 'image/png', sizes: '180x180', href: '/apple-touch-icon.png' }],
48+
['link', { rel: 'icon', type: 'image/png', sizes: '32x32', href: '/images/logo/logo32.png' }],
49+
['link', { rel: 'icon', type: 'image/png', sizes: '16x16', href: '/images/logo/logo16.png' }],
50+
51+
['meta', { name: 'darkreader-lock' }],
52+
53+
['meta', { name: 'theme-color', content: settings.color }],
54+
['meta', { name: 'description', content: settings.description.long }],
55+
56+
['meta', { property: 'og:type', content: 'website' }],
57+
['meta', { property: 'og:site_name', content: settings.name }],
58+
['meta', { property: 'og:title', content: settings.title }],
59+
['meta', { property: 'og:description', content: settings.description.short }],
60+
['meta', { property: 'og:image', content: settings.image }],
61+
['meta', { property: 'og:image:alt', content: settings.title }],
62+
63+
['meta', { property: 'twitter:card', content: 'summary' }],
64+
['meta', { property: 'twitter:site', content: settings.name }],
65+
['meta', { property: 'twitter:title', content: settings.title }],
66+
['meta', { property: 'twitter:description', content: settings.description.short }],
67+
['meta', { property: 'twitter:image', content: settings.image }],
68+
['meta', { property: 'twitter:image:alt', content: settings.title }],
69+
],
70+
71+
cleanUrls: true,
72+
themeConfig: {
73+
// https://vitepress.dev/reference/default-theme-config
74+
siteTitle: settings.siteTitle,
75+
logo: '/images/logo/logo32.png',
76+
nav: [
77+
{ text: 'Home', link: '/' },
78+
{ text: 'Guides', link: '/guides/get-started', activeMatch: '/guides/' },
79+
{ text: 'Docs', link: '/docs/inputs', activeMatch: '/docs/' },
80+
{ text: 'Support', link: '/support' },
81+
{
82+
text: 'Links',
83+
items: [
84+
{ text: 'GitHub Repository', link: settings.source_repo },
85+
{ text: 'GitHub Marketplace', link: settings.actions_url },
86+
{ text: 'GitHub Documentation', link: settings.docs_repo },
87+
{ text: 'Portainer Stack Deploy', link: 'https://github.com/cssnr/portainer-stack-deploy-action' },
88+
{ text: 'Developer Site', link: 'https://cssnr.github.io/' },
89+
{ text: 'Contribute', link: 'https://ko-fi.com/cssnr' },
90+
],
91+
},
92+
],
93+
94+
socialLinks: [
95+
{ icon: 'github', link: settings.source_repo },
96+
{
97+
icon: {
98+
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.984 13.836a.5.5 0 0 1-.353-.146l-.745-.743a.5.5 0 1 1 .706-.708l.392.391 1.181-1.18a.5.5 0 0 1 .708.707l-1.535 1.533a.504.504 0 0 1-.354.146zm9.353-.147l1.534-1.532a.5.5 0 0 0-.707-.707l-1.181 1.18-.392-.391a.5.5 0 1 0-.706.708l.746.743a.497.497 0 0 0 .706-.001zM4.527 7.452l2.557-1.585A1 1 0 0 0 7.09 4.17L4.533 2.56A1 1 0 0 0 3 3.406v3.196a1.001 1.001 0 0 0 1.527.85zm2.03-2.436L4 6.602V3.406l2.557 1.61zM24 12.5c0 1.93-1.57 3.5-3.5 3.5a3.503 3.503 0 0 1-3.46-3h-2.08a3.503 3.503 0 0 1-3.46 3 3.502 3.502 0 0 1-3.46-3h-.558c-.972 0-1.85-.399-2.482-1.042V17c0 1.654 1.346 3 3 3h.04c.244-1.693 1.7-3 3.46-3 1.93 0 3.5 1.57 3.5 3.5S13.43 24 11.5 24a3.502 3.502 0 0 1-3.46-3H8c-2.206 0-4-1.794-4-4V9.899A5.008 5.008 0 0 1 0 5c0-2.757 2.243-5 5-5s5 2.243 5 5a5.005 5.005 0 0 1-4.952 4.998A2.482 2.482 0 0 0 7.482 12h.558c.244-1.693 1.7-3 3.46-3a3.502 3.502 0 0 1 3.46 3h2.08a3.503 3.503 0 0 1 3.46-3c1.93 0 3.5 1.57 3.5 3.5zm-15 8c0 1.378 1.122 2.5 2.5 2.5s2.5-1.122 2.5-2.5-1.122-2.5-2.5-2.5S9 19.122 9 20.5zM5 9c2.206 0 4-1.794 4-4S7.206 1 5 1 1 2.794 1 5s1.794 4 4 4zm9 3.5c0-1.378-1.122-2.5-2.5-2.5S9 11.122 9 12.5s1.122 2.5 2.5 2.5 2.5-1.122 2.5-2.5zm9 0c0-1.378-1.122-2.5-2.5-2.5S18 11.122 18 12.5s1.122 2.5 2.5 2.5 2.5-1.122 2.5-2.5zm-13 8a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0zm2 0a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0zm12 0c0 1.93-1.57 3.5-3.5 3.5a3.503 3.503 0 0 1-3.46-3.002c-.007.001-.013.005-.021.005l-.506.017h-.017a.5.5 0 0 1-.016-.999l.506-.017c.018-.002.035.006.052.007A3.503 3.503 0 0 1 20.5 17c1.93 0 3.5 1.57 3.5 3.5zm-1 0c0-1.378-1.122-2.5-2.5-2.5S18 19.122 18 20.5s1.122 2.5 2.5 2.5 2.5-1.122 2.5-2.5z"/></svg>',
99+
},
100+
link: settings.actions_url,
101+
},
102+
{ icon: 'vitepress', link: settings.docs_repo },
103+
{
104+
icon: {
105+
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12.504 0v1.023l-.01-.015l-6.106 3.526H3.417v.751h5.359v3.638h1.942V5.284h1.786V15.7c.027 0 .54-.01.751.091V5.285h.531v10.608c.293.147.55.312.751.54V5.286h6.046v-.75h-1.267l-6.061-3.5V0zm0 1.87v2.664H7.889zm.751.031l4.56 2.633h-4.56zM9.142 5.285h1.21v1.686h-1.21zm-4.736 2.73v1.951h1.942v-1.95zm2.19 0v1.951h1.941v-1.95zm-2.19 2.171v1.951h1.942v-1.95zm2.19 0v1.951h1.941v-1.95zm2.18 0v1.951h1.942v-1.95zM4.36 12.43a3.73 3.73 0 0 0-.494 1.851c0 1.227.604 2.308 1.52 2.986c.239-.064.477-.1.724-.11c.1 0 .165.01.266.019c.284-1.191 1.383-1.988 2.665-1.988c.724 0 1.438.201 1.924.668c.229-.476.302-1.007.302-1.575c0-.65-.165-1.292-.494-1.85zm4.828 3.16c-1.21 0-2.226.844-2.492 1.97a1 1 0 0 0-.275-.009a2.56 2.56 0 0 0-2.564 2.556a2.565 2.565 0 0 0 3.096 2.5A2.58 2.58 0 0 0 9.233 24c.862 0 1.622-.43 2.09-1.081a2.557 2.557 0 0 0 4.186-1.97c0-.567-.193-1.099-.504-1.52a2.557 2.557 0 0 0-3.866-2.94a2.57 2.57 0 0 0-1.951-.898z"/></svg>',
106+
},
107+
link: 'https://github.com/cssnr/portainer-stack-deploy-action',
108+
},
109+
{ icon: 'discord', link: 'https://discord.gg/wXy6m2X8wY' },
110+
{ icon: 'kofi', link: 'https://ko-fi.com/cssnr' },
111+
{
112+
icon: {
113+
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: none;" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-globe"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg>',
114+
},
115+
link: 'https://cssnr.github.io/',
116+
},
117+
],
118+
119+
sidebar: [
120+
{
121+
text: 'Guides',
122+
base: '/guides',
123+
items: [
124+
{ text: 'Get Started', link: '/get-started' },
125+
{ text: 'Features', link: '/features' },
126+
{ text: 'Examples', link: '/examples' },
127+
//
128+
],
129+
},
130+
{
131+
text: 'Documentation',
132+
base: '/docs',
133+
items: [
134+
{ text: 'Inputs', link: '/inputs' },
135+
//
136+
],
137+
},
138+
{
139+
text: 'Support',
140+
items: [
141+
{ text: 'Get Help', link: '/support' },
142+
//
143+
],
144+
},
145+
],
146+
147+
editLink: {
148+
pattern: `${settings.docs_repo}/blob/master/docs/:path`,
149+
text: 'View on GitHub',
150+
},
151+
152+
lastUpdated: {
153+
text: 'Updated at',
154+
formatOptions: {
155+
dateStyle: 'medium',
156+
timeStyle: 'medium',
157+
},
158+
},
159+
160+
search: {
161+
provider: 'local',
162+
// provider: 'algolia',
163+
// options: {
164+
// appId: '92WIHGWBPF',
165+
// apiKey: '17f27bbfbb03ba96e4ca53714e29fe62',
166+
// indexName: 'stack-deploy-docs',
167+
// },
168+
},
169+
170+
// footer: {
171+
// message: '<a href="/privacy">Privacy Policy</a>',
172+
// copyright: '<a href="/privacy">Privacy Policy</a>',
173+
// },
174+
175+
externalLinkIcon: true,
176+
outline: 'deep',
177+
},
178+
})

.vitepress/theme/custom.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
:root {
2+
--vp-home-hero-name-color: transparent;
3+
--vp-home-hero-name-background: -webkit-linear-gradient(120deg, #1d63ed 30%, #b3d4f3);
4+
--vp-home-hero-image-background-image: linear-gradient(
5+
0deg,
6+
rgba(29, 99, 237, 0.7),
7+
rgba(29, 99, 237, 0.7)
8+
);
9+
--vp-home-hero-image-filter: blur(64px);
10+
}
11+
12+
body {
13+
overflow-y: scroll;
14+
}
15+
16+
summary {
17+
cursor: pointer;
18+
}
19+
20+
.vp-doc img {
21+
display: inline-block;
22+
margin-right: 8px;
23+
}

.vitepress/theme/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
import './custom.css'
3+
import 'virtual:group-icons.css'
4+
5+
// noinspection JSUnusedGlobalSymbols
6+
export default {
7+
...DefaultTheme,
8+
}

0 commit comments

Comments
 (0)