Skip to content

Commit 938f115

Browse files
committed
Initial commit
0 parents  commit 938f115

File tree

9 files changed

+197
-0
lines changed

9 files changed

+197
-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: dist/
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: "\U0001F449 %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 Vue 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# dependencies
2+
/node_modules
3+
4+
# build output
5+
/dist
6+
7+
# misc
8+
.DS_Store

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# example-vue
2+
3+
[![view-action-graph](https://img.shields.io/github/actions/workflow/status/actionforge/example-vue/workflow.yml?label=View%20Action%20Graph)](https://app.actionforge.dev/github/actionforge/example-vue/main/.github/workflows/graphs/build.act)
4+
5+
A simple Hello World app in Vue, 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 (dist/)
20+
```
21+
22+
It runs on every push to `main`, on pull requests, and on manual dispatch.

index.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+
<title>Hello World</title>
6+
</head>
7+
<body>
8+
<div id="app"></div>
9+
<script type="module" src="/src/main.js"></script>
10+
</body>
11+
</html>

package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "hello-world",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite",
7+
"build": "vite build"
8+
},
9+
"dependencies": {
10+
"vue": "^3.5.13"
11+
},
12+
"devDependencies": {
13+
"@vitejs/plugin-vue": "^5.2.3",
14+
"vite": "^6.3.5"
15+
}
16+
}

src/App.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<h1>Hello, World!</h1>
3+
</template>

src/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { createApp } from "vue";
2+
import App from "./App.vue";
3+
4+
createApp(App).mount("#app");

vite.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from "vite";
2+
import vue from "@vitejs/plugin-vue";
3+
4+
export default defineConfig({
5+
plugins: [vue()],
6+
});

0 commit comments

Comments
 (0)