Skip to content

Commit 535d143

Browse files
authored
Git sync doc (windmill-labs#433)
* Git sync doc * Fix after Guillaume's comments
1 parent f6567d1 commit 535d143

File tree

4 files changed

+122
-0
lines changed

4 files changed

+122
-0
lines changed

docs/advanced/10_git_sync/index.mdx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import DocCard from '@site/src/components/DocCard';
2+
3+
# Sync Workspace to Remote Git Repository
4+
5+
From the workspace settings, you can set a [git_repository](../../integrations/git_repository.mdx) resource on which the workspace will automatically commit and push scripts, flows and apps to the repository on each deploy.
6+
7+
<iframe
8+
style={{ aspectRatio: '16/9' }}
9+
src="https://www.youtube.com/embed/JqG0KNYWLx0?vq=hd1080"
10+
title="Sync Workspace to Remote Git Repository"
11+
frameBorder="0"
12+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
13+
allowFullScreen
14+
className="border-2 rounded-xl object-cover w-full dark:border-gray-800"
15+
></iframe>
16+
17+
<br/>
18+
19+
:::info Private Folders
20+
21+
All scripts, flows and apps located in the workspace will be pushed to the Git repository, except the ones that are saved in private user folders (i.e. where the path starts with `u/`, use those with `f/` instead).
22+
23+
<br/>
24+
25+
Filtering out certain sensitive folders from the sync will be available soon.
26+
27+
:::
28+
29+
On each [deployment](../../core_concepts/0_draft_and_deploy/index.mdx#deployed-version), only the updated script/flow/app will be pushed to the remote Git repository.
30+
31+
For the Git repo to be representative of the entire workspace, it is recommended to set it up using the [Windmill CLI](../3_cli/index.mdx) before turning this option on.
32+
33+
Run the following commands from the git repo folder to push the initial workspace content to the remote:
34+
35+
```bash
36+
> echo 'u/' > .wmillignore
37+
> wmill sync pull --raw --skip-variables --skip-secrets --skip-resources
38+
> git add -A
39+
> git commit -m 'Initial commit'
40+
41+
```
42+
43+
<div class="text-xl mb-2 font-semibold"></div>
44+
<div class="grid grid-cols-2 gap-6 mb-4">
45+
<DocCard
46+
title="Command-Line Interface"
47+
description="Interact with Windmill instances right from your terminal."
48+
href="/docs/advanced/cli"
49+
/>
50+
</div>

docs/core_concepts/index.mdx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,47 @@ On top of its editors to build endpoints, flows and apps, Windmill comes with a
124124
/>
125125
</div>
126126

127+
## Windmill for Developers
128+
129+
<div class="text-xl mb-2 font-semibold"></div>
130+
<div class="grid grid-cols-2 gap-6 mb-4">
131+
<DocCard
132+
title="Command-Line Interface"
133+
description="Interact with Windmill instances right from your terminal."
134+
href="/docs/advanced/cli"
135+
/>
136+
<DocCard
137+
title="Local Development"
138+
description="Develop from various environments such as your terminal, VS Code, and JetBrains IDEs."
139+
href="/docs/advanced/local_development"
140+
/>
141+
<DocCard
142+
title="Sync Workspace to Remote Git Repository"
143+
description="Connect the Windmill workspace to a Git repository to automatically commit and push scripts, flows and apps to the repository on each deploy."
144+
href="/docs/advanced/git_sync"
145+
/>
146+
<DocCard
147+
title="Version control from GitHub/GitLab"
148+
description="Use a GH/GL repo as the source of truth for part or all of your Windmill workspace."
149+
href="/docs/advanced/deploy_gh_gl"
150+
/>
151+
<DocCard
152+
title="Preinstall Binaries"
153+
description="Workers in Windmill can preinstall binaries. This allows them to execute these binaries in subprocesses or directly within bash."
154+
href="/docs/advanced/preinstall_binaries"
155+
/>
156+
<DocCard
157+
title="React App Import"
158+
description="Import your own Apps in React."
159+
href="/docs/react_vue_svelte_apps/react"
160+
/>
161+
<DocCard
162+
title="Run Docker Containers"
163+
description="Windmill supports running any docker container through its bash integration."
164+
href="/docs/advanced/docker"
165+
/>
166+
</div>
167+
127168
## Enterprise & Team Features
128169

129170
<div class="grid grid-cols-2 gap-6 mb-4">

docs/integrations/git_repository.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import DocCard from '@site/src/components/DocCard';
2+
3+
# Git Integration
4+
5+
[Resource Type](https://hub.windmill.dev/resource_types/135/git_repository) used to sync Windmill workspace to a remote repository that will automatically be committed and pushed scripts, flows and apps on each deploy.
6+
7+
More:
8+
9+
<div class="grid grid-cols-2 gap-6 mb-4">
10+
<DocCard
11+
title="Sync Workspace to Remote Git Repository"
12+
description="Connect the Windmill workspace to a Git repository to automatically commit and push scripts, flows and apps to the repository on each deploy."
13+
href="/docs/advanced/git_sync"
14+
/>
15+
</div>
16+
17+
<iframe
18+
style={{ aspectRatio: '16/9' }}
19+
src="https://www.youtube.com/embed/JqG0KNYWLx0?vq=hd1080"
20+
title="Sync Workspace to Remote Git Repository"
21+
frameBorder="0"
22+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
23+
allowFullScreen
24+
className="border-2 rounded-xl object-cover w-full dark:border-gray-800"
25+
></iframe>

sidebars.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ const sidebars = {
320320
]
321321
},
322322
'advanced/deploy_gh_gl/index',
323+
'advanced/git_sync/index',
323324
'advanced/preinstall_binaries/index',
324325
{
325326
type: 'category',
@@ -455,6 +456,11 @@ const sidebars = {
455456
id: 'integrations/gsheets',
456457
label: 'Google Sheets'
457458
},
459+
{
460+
type: 'doc',
461+
id: 'integrations/git_repository',
462+
label: 'Git Repository'
463+
},
458464
{
459465
type: 'doc',
460466
id: 'integrations/github',

0 commit comments

Comments
 (0)