Skip to content

Commit 4237a2b

Browse files
committed
Initial commit
0 parents  commit 4237a2b

File tree

17 files changed

+270
-0
lines changed

17 files changed

+270
-0
lines changed

.github/workflows/graphs/build.act

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
entry: gh-start
2+
nodes:
3+
- id: gh-start
4+
type: core/gh-start@v1
5+
position:
6+
x: -150
7+
y: 20
8+
- id: checkout
9+
type: github.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
10+
position:
11+
x: 270
12+
y: 660
13+
- id: setup-node
14+
type: github.com/actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238
15+
position:
16+
x: 810
17+
y: 610
18+
inputs:
19+
node-version: '22'
20+
- id: build
21+
type: core/run@v1
22+
position:
23+
x: 1290
24+
y: 540
25+
inputs:
26+
script: npm install && npm run build
27+
- id: upload-artifact
28+
type: >-
29+
github.com/actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
30+
position:
31+
x: 1720
32+
y: 460
33+
inputs:
34+
name: hello-world
35+
path: build/
36+
- id: print
37+
type: core/print@v1
38+
position:
39+
x: 2600
40+
y: 420
41+
inputs:
42+
values[0]: null
43+
color: fg_green
44+
- id: string-fmt
45+
type: core/string-fmt@v1
46+
position:
47+
x: 2200
48+
y: 620
49+
inputs:
50+
substitutes[0]: null
51+
fmt: 👉 %v
52+
connections:
53+
- src:
54+
node: upload-artifact
55+
port: artifact-url
56+
dst:
57+
node: string-fmt
58+
port: substitutes[0]
59+
- src:
60+
node: string-fmt
61+
port: result
62+
dst:
63+
node: print
64+
port: values[0]
65+
executions:
66+
- src:
67+
node: gh-start
68+
port: exec-on_push
69+
dst:
70+
node: checkout
71+
port: exec
72+
- src:
73+
node: gh-start
74+
port: exec-on_pull_request
75+
dst:
76+
node: checkout
77+
port: exec
78+
- src:
79+
node: gh-start
80+
port: exec-on_workflow_dispatch
81+
dst:
82+
node: checkout
83+
port: exec
84+
- src:
85+
node: checkout
86+
port: exec-success
87+
dst:
88+
node: setup-node
89+
port: exec
90+
- src:
91+
node: setup-node
92+
port: exec-success
93+
dst:
94+
node: build
95+
port: exec
96+
- src:
97+
node: build
98+
port: exec-success
99+
dst:
100+
node: upload-artifact
101+
port: exec
102+
- src:
103+
node: upload-artifact
104+
port: exec-success
105+
dst:
106+
node: print
107+
port: exec

.github/workflows/workflow.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
pull_request:
7+
branches:
8+
- main
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
name: Build Svelte App
16+
steps:
17+
- name: Run Graph
18+
uses: actionforge/action@866e7df1ce5e84a2b32fda7414812ae72000dae8 # v0.14.6
19+
with:
20+
graph-file: build.act

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
node_modules
2+
3+
# Output
4+
.output
5+
.vercel
6+
.netlify
7+
.wrangler
8+
/.svelte-kit
9+
/build
10+
11+
# OS
12+
.DS_Store
13+
Thumbs.db
14+
15+
# Env
16+
.env
17+
.env.*
18+
!.env.example
19+
!.env.test
20+
21+
# Vite
22+
vite.config.js.timestamp-*
23+
vite.config.ts.timestamp-*

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# example-svelte
2+
3+
[![view-action-graph](https://img.shields.io/github/actions/workflow/status/actionforge/example-svelte/workflow.yml?label=View%20Action%20Graph)](https://app.actionforge.dev/github/actionforge/example-svelte/main/.github/workflows/graphs/build.act)
4+
5+
A simple Hello World app in Svelte, built using an [Actionforge](https://actionforge.dev) graph as the CI/CD pipeline.
6+
7+
## Run
8+
9+
```bash
10+
npm install
11+
npm run dev
12+
```
13+
14+
## Graph
15+
16+
The build pipeline is defined as an Actionforge graph in [`.github/workflows/graphs/build.act`](.github/workflows/graphs/build.act):
17+
18+
```
19+
checkout -> run (npm install && npm run build) -> upload-artifact (build/)
20+
```
21+
22+
It runs on every push to `main`, on pull requests, and on manual dispatch.

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "hello-world",
3+
"private": true,
4+
"version": "0.0.1",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build",
9+
"preview": "vite preview"
10+
},
11+
"devDependencies": {
12+
"@sveltejs/adapter-static": "^3.0.0",
13+
"@sveltejs/kit": "^2.50.2",
14+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
15+
"svelte": "^5.49.2",
16+
"typescript": "^5.9.3",
17+
"vite": "^7.3.1"
18+
}
19+
}

src/app.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// See https://svelte.dev/docs/kit/types#app.d.ts
2+
// for information about these interfaces
3+
declare global {
4+
namespace App {
5+
// interface Error {}
6+
// interface Locals {}
7+
// interface PageData {}
8+
// interface PageState {}
9+
// interface Platform {}
10+
}
11+
}
12+
13+
export {};

src/app.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
%sveltekit.head%
7+
</head>
8+
<body data-sveltekit-preload-data="hover">
9+
<div style="display: contents">%sveltekit.body%</div>
10+
</body>
11+
</html>

src/lib/assets/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading

src/lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// place files you want to import through the `$lib` alias in this folder.

0 commit comments

Comments
 (0)