Skip to content

Commit 2803ad0

Browse files
authored
Merge pull request #7 from sitedog-io/main
Simplify push action + new auth flow
2 parents 1e626ba + 797136d commit 2803ad0

Some content is hidden

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

85 files changed

+2560
-48
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: sitedog-cloud
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths: ['sitedog.yml']
7+
workflow_dispatch: # Allow manual trigger
8+
9+
jobs:
10+
sync-config:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Check if sitedog.yml exists
18+
id: check-config
19+
run: |
20+
if [[ -f "sitedog.yml" ]]; then
21+
echo "config_exists=true" >> $GITHUB_OUTPUT
22+
echo "✅ Found sitedog.yml"
23+
else
24+
echo "config_exists=false" >> $GITHUB_OUTPUT
25+
echo "⚠️ No sitedog.yml found, skipping sync"
26+
fi
27+
28+
- name: Download sitedog CLI
29+
if: steps.check-config.outputs.config_exists == 'true'
30+
run: |
31+
curl -sL https://get.sitedog.io | sh
32+
echo "$HOME/.sitedog/bin" >> $GITHUB_PATH
33+
34+
- name: Push config to cloud
35+
if: steps.check-config.outputs.config_exists == 'true'
36+
env:
37+
SITEDOG_TOKEN: ${{ secrets.SITEDOG_TOKEN }}
38+
run: |
39+
if [[ -z "$SITEDOG_TOKEN" ]]; then
40+
echo "⚠️ SITEDOG_TOKEN secret not set, skipping push"
41+
echo "💡 Add SITEDOG_TOKEN to repository secrets to enable auto-sync"
42+
exit 0
43+
fi
44+
45+
echo "🚀 Pushing config to cloud..."
46+
sitedog push --title "${{ github.repository }}"
47+
48+
- name: Summary
49+
if: always()
50+
run: |
51+
echo "## 🐶 Sitedog Config Sync" >> $GITHUB_STEP_SUMMARY
52+
if [[ "${{ steps.check-config.outputs.config_exists }}" == "true" ]]; then
53+
if [[ -n "${{ secrets.SITEDOG_TOKEN }}" ]]; then
54+
echo "✅ Config successfully synced to cloud" >> $GITHUB_STEP_SUMMARY
55+
else
56+
echo "⚠️ SITEDOG_TOKEN not configured - sync skipped" >> $GITHUB_STEP_SUMMARY
57+
fi
58+
else
59+
echo "⚠️ No sitedog.yml found - sync skipped" >> $GITHUB_STEP_SUMMARY
60+
fi

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ AGENTS.md
66
sitedog.html
77
.cursor
88
sitedog
9-
data/services/*
109
.DS_Store
1110
test-project/sitedog.yml
11+
testdata/*/sitedog.yml

Makefile

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
include make-*.mk
2-
.PHONY: help push build-docker bump-version
2+
.PHONY: help push build-docker bump-version test release
33

44
help:
55
@echo "Available commands:"
66
@echo " help - Show this help message"
77
@echo " build - Build all Go binaries for all platforms (in Docker, output to ./dist)"
88
@echo " push - Update files in gist (binaries from ./dist, install/uninstall scripts, etc.)"
99
@echo " push! - build + push"
10+
@echo " test - Run all tests"
1011
@echo " bump-version - Update version in main.go and create git tag"
1112
@echo " push-version - Push changes and tags to remote repository"
13+
@echo " release - Run tests, bump version, and push (Usage: make release v=x.y.z)"
1214
@echo " show-versions - Display all git tags"
1315
@echo " install - Install sitedog"
1416
@echo " uninstall - Uninstall sitedog"
@@ -52,6 +54,33 @@ push-version:
5254
git push
5355
git push --tags
5456

57+
test:
58+
@echo "Running tests..."
59+
go test -v
60+
61+
release:
62+
@if [ -z "$(v)" ]; then \
63+
echo "Usage: make release v=x.y.z"; \
64+
echo "Example: make release v=0.6.6"; \
65+
exit 1; \
66+
fi; \
67+
echo "🧪 Running tests..."; \
68+
if ! go test -v; then \
69+
echo "❌ Tests failed! Release aborted."; \
70+
exit 1; \
71+
fi; \
72+
echo "✅ Tests passed!"; \
73+
echo "📝 Bumping version to $(v)..."; \
74+
sed -i 's/Version[ ]*=[ ]*".*"/Version = "$(v)"/' main.go; \
75+
go fmt main.go; \
76+
echo "📦 Creating commit and tag..."; \
77+
git add main.go; \
78+
git commit -m "🚀 Release $(v)"; \
79+
git tag $(v); \
80+
echo "🚀 Pushing to repository..."; \
81+
git push origin main --tags; \
82+
echo "✨ Release $(v) completed successfully!"
83+
5584
show-versions:
5685
@git tag -l
5786

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ We believe that Sitedog should be a part of your workflow, not just a tool to sh
152152

153153
**🚀 Coming soon:**
154154

155-
- [ ] VS Code extension
156-
- [ ] Chrome extension to augment GitLab/Github with sitedog cards
155+
- [x] [VS Code extension](https://github.com/sitedog-io/sitedog-vscode)
156+
- [x] [Chrome extension](https://github.com/sitedog-io/sitedog-chrome) to augment GitLab/Github with sitedog cards
157157
- [ ] GitLab CI example
158-
- [ ] GitHub Actions example
158+
- [x] [GitHub Actions example](https://github.com/sitedog-io/sitedog-cli/blob/main/.github/workflows/sitedog-cloud.yml)
159159
- [ ] Git hooks example
160160

161161
---

data/file-detectors.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ technologies:
8181
display_name: "Ruby Gem"
8282
files:
8383
- "*.gemspec"
84-
- "lib/"
8584
fallback_url: "https://rubygems.org"
8685

8786
nx-workspace:
@@ -118,7 +117,6 @@ technologies:
118117
files:
119118
- "sanity.config.js"
120119
- "sanity.config.ts"
121-
- "studio/"
122120
fallback_url: "https://sanity.io/manage"
123121

124122
strapi:
@@ -170,16 +168,13 @@ technologies:
170168
- "k8s/*.yaml"
171169
- "kubernetes/*.yml"
172170
- "kubernetes/*.yaml"
173-
- "deployment.yml"
174-
- "deployment.yaml"
175171
fallback_url: "https://kubernetes.io"
176172

177173
helm:
178174
display_name: "Helm"
179175
files:
180176
- "Chart.yaml"
181177
- "values.yaml"
182-
- "charts/"
183178
fallback_url: "https://helm.sh"
184179

185180
terraform:

data/services/airbrake.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Airbrake
3+
url: https://app.airbrake.io
4+
stacks:
5+
python:
6+
- airbrake
7+
- pybrake
8+
- django-airbrake
9+
nodejs:
10+
- "@airbrake/node"
11+
- airbrake-js
12+
- "@airbrake/browser"
13+
- airbrake
14+
ruby:
15+
- airbrake
16+
- airbrake-sinatra
17+
- airbrake-ruby
18+
java:
19+
- io.airbrake:airbrake-java
20+
- io.airbrake:javabrake
21+
go:
22+
- github.com/airbrake/gobrake
23+
php:
24+
- airbrake/phpbrake
25+
- airbrake/airbrake-php
26+
- kouz/laravel-airbrake
27+
dotnet:
28+
- Sharpbrake

data/services/airtable.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Airtable
3+
url: https://airtable.com
4+
stacks:
5+
python:
6+
- airtable-python-wrapper
7+
- pyairtable
8+
nodejs:
9+
- airtable
10+
- airtable-node
11+
- "@airtable/blocks-cli"
12+
ruby:
13+
- airrecord
14+
- airtable
15+
java:
16+
- dev.fuxing:airtable-api
17+
go:
18+
- github.com/fabioberger/airtable-go
19+
- github.com/mehanizm/airtable
20+
php:
21+
- sleiman/airtable-php
22+
- armetiz/airtable-php
23+
dotnet:
24+
- AirtableApiClient

data/services/algolia.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Algolia
3+
url: https://dashboard.algolia.com
4+
stacks:
5+
python:
6+
- django-algolia
7+
- algoliasearch
8+
- algoliasearch-django
9+
nodejs:
10+
- algoliasearch
11+
- react-instantsearch
12+
- "@algolia/client-search"
13+
- instantsearch.js
14+
- gatsby-plugin-algolia
15+
- angular-instantsearch
16+
- vue-instantsearch
17+
ruby:
18+
- algoliasearch
19+
- algoliasearch-rails
20+
java:
21+
- com.algolia:algoliasearch-client-java
22+
- com.algolia:algoliasearch-apache
23+
- com.algolia:algoliasearch
24+
go:
25+
- github.com/algolia/algoliasearch-client-go
26+
php:
27+
- laravel/scout
28+
- algolia/search-bundle
29+
- algolia/scout-extended
30+
- algolia/algoliasearch-client-php
31+
dotnet:
32+
- Algolia.Search

data/services/amplitude.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Amplitude
3+
url: https://analytics.amplitude.com
4+
stacks:
5+
python:
6+
- django-amplitude
7+
- amplitude-analytics
8+
- pyamplitude
9+
nodejs:
10+
- "@amplitude/experiment-node-server"
11+
- react-amplitude
12+
- "@amplitude/analytics-node"
13+
- amplitude-js
14+
- "@amplitude/analytics-browser"
15+
ruby:
16+
- amplitude-api
17+
java:
18+
- com.amplitude:experiment-android-client
19+
- com.amplitude:java-sdk
20+
- com.amplitude:android-sdk
21+
go:
22+
- github.com/amplitude/analytics-go
23+
php:
24+
- zumba/amplitude-php
25+
dotnet:
26+
- AmplitudeSharp
27+
- Amplitude.NET

data/services/anthropic.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Anthropic
3+
url: https://console.anthropic.com
4+
stacks:
5+
python:
6+
- anthropic
7+
- langchain-anthropic
8+
nodejs:
9+
- "@anthropic-ai/sdk"
10+
- "@langchain/anthropic"
11+
- anthropic
12+
ruby:
13+
- anthropic
14+
java:
15+
- com.anthropic:anthropic-java
16+
go:
17+
- github.com/anthropics/anthropic-sdk-go
18+
dotnet:
19+
- Anthropic.SDK

0 commit comments

Comments
 (0)