Skip to content

Commit c8241c1

Browse files
committed
chore: add .gitignore, LICENSE, and auto custom domain setup
- .gitignore: macOS, editors, runtime files, .sisyphus work tracking - LICENSE: MIT - deploy.yml: auto-configure openboot.dev custom domain via Cloudflare API
1 parent 4d90362 commit c8241c1

File tree

3 files changed

+106
-5
lines changed

3 files changed

+106
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- '.github/workflows/deploy.yml'
1010
workflow_dispatch:
1111

12+
env:
13+
PROJECT_NAME: openboot
14+
CUSTOM_DOMAIN: openboot.dev
15+
1216
jobs:
1317
deploy:
1418
runs-on: ubuntu-latest
@@ -20,9 +24,48 @@ jobs:
2024
- name: Checkout
2125
uses: actions/checkout@v4
2226

23-
- name: Deploy to Cloudflare Pages
24-
uses: cloudflare/wrangler-action@v3
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
2529
with:
26-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
27-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
28-
command: pages deploy website --project-name=openboot
30+
node-version: '20'
31+
32+
- name: Install Wrangler
33+
run: npm install -g wrangler
34+
35+
- name: Create Pages Project (if not exists)
36+
continue-on-error: true
37+
env:
38+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
39+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
40+
run: |
41+
wrangler pages project create $PROJECT_NAME --production-branch=main 2>/dev/null || echo "Project already exists"
42+
43+
- name: Deploy to Cloudflare Pages
44+
id: deploy
45+
env:
46+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
47+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
48+
run: |
49+
wrangler pages deploy website --project-name=$PROJECT_NAME --branch=main
50+
51+
- name: Configure Custom Domain
52+
env:
53+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
54+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
55+
run: |
56+
# Check if custom domain already configured
57+
EXISTING=$(curl -s -X GET \
58+
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects/$PROJECT_NAME/domains" \
59+
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
60+
-H "Content-Type: application/json" | jq -r '.result[].name' | grep -x "$CUSTOM_DOMAIN" || true)
61+
62+
if [ -z "$EXISTING" ]; then
63+
echo "Adding custom domain: $CUSTOM_DOMAIN"
64+
curl -s -X POST \
65+
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects/$PROJECT_NAME/domains" \
66+
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
67+
-H "Content-Type: application/json" \
68+
--data "{\"name\":\"$CUSTOM_DOMAIN\"}"
69+
else
70+
echo "Custom domain $CUSTOM_DOMAIN already configured"
71+
fi

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# macOS
2+
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
._*
6+
7+
# Editor
8+
.idea/
9+
.vscode/
10+
*.swp
11+
*.swo
12+
*~
13+
14+
# OpenBoot runtime
15+
~/.openboot/
16+
17+
# Logs
18+
*.log
19+
logs/
20+
21+
# Node (if adding build tools later)
22+
node_modules/
23+
npm-debug.log*
24+
25+
# Python (if adding scripts later)
26+
__pycache__/
27+
*.py[cod]
28+
.env
29+
.venv/
30+
31+
# Work tracking (internal)
32+
.sisyphus/
33+
34+
# Temporary files
35+
*.tmp
36+
*.temp
37+
.cache/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 fullstackjam
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)