Skip to content

Commit 9b0d622

Browse files
authored
Merge pull request #28 from spinframework/ci/build
ci(.github): add build.yml; defer linting for now
2 parents fb2c17d + fcff851 commit 9b0d622

File tree

6 files changed

+59
-5
lines changed

6 files changed

+59
-5
lines changed

.github/workflows/build.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
branches: [main]
5+
6+
env:
7+
BART_VERSION: v0.10.0
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-24.04
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
20+
- name: Setup Spin
21+
uses: fermyon/actions/spin/setup@v1
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Install bart
26+
run: |
27+
curl -LOs https://github.com/fermyon/bartholomew/releases/download/${{ env.BART_VERSION }}/bart-${{ env.BART_VERSION }}-linux-amd64.tar.gz
28+
tar zxvf bart-${{ env.BART_VERSION }}-linux-amd64.tar.gz
29+
mv bart /usr/local/bin
30+
- name: Check Docs
31+
run: |
32+
bart check --shortcodes shortcodes content/* && bart check --shortcodes shortcodes content/**/*
33+
34+
- name: Install npm packages
35+
run: |
36+
npm ci
37+
npm ci --prefix ./spin-up-hub
38+
39+
- name: Build app
40+
run: |
41+
spin build
42+
43+
# TODO: re-enable after figuring out how to confgure the current linting tool; or choose another.
44+
# By default, the current tool appears very aggressive, presenting errors for eg
45+
# multiple consecutive new-lines, non-conforming title capitalization, etc
46+
#
47+
# - name: Lint markdown
48+
# run: |
49+
# npm run lint-markdown
50+
51+
- name: Run npm tests
52+
run: |
53+
npm test

content/v2/contributing-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Reference resources are merely a dry description; describing the feature in its
5858

5959
### 4. Explanation
6060

61-
An explanation resource is written using a deep-dive approach i.e. providing a deep explanation with the view to impart a deep understanding of a particular concept, feature or product. You may find your contribution is so in-depth that it becomes a long form article like a blog post. If that is the case, please get in touch and we can discuss options around getting your content published on another platform; like the [Spin Blog](https://spinframework.dev/blog).
61+
An explanation resource is written using a deep-dive approach i.e. providing a deep explanation with the view to impart a deep understanding of a particular concept, feature or product. You may find your contribution is so in-depth that it becomes a long form article like a blog post. If that is the case, consider an addition to the Spin Blog.
6262

6363
## Technical Documentation Procedure
6464

content/v3/contributing-docs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Reference resources are merely a dry description; describing the feature in its
5858

5959
### 4. Explanation
6060

61-
An explanation resource is written using a deep-dive approach i.e. providing a deep explanation with the view to impart a deep understanding of a particular concept, feature or product. You may find your contribution is so in-depth that it becomes a long form article like a blog post. If that is the case, please get in touch and we can discuss options around getting your content published on another platform; like the [Spin Blog](https://spinframework.dev/blog).
61+
An explanation resource is written using a deep-dive approach i.e. providing a deep explanation with the view to impart a deep understanding of a particular concept, feature or product. You may find your contribution is so in-depth that it becomes a long form article like a blog post. If that is the case, consider an addition to the Spin Blog.
6262

6363
## Technical Documentation Procedure
6464

content/v3/deploying.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ title = "Deploy Options"
22
template = "main"
33
date = "2023-11-04T00:00:01Z"
44
[extra]
5-
url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/deploying-to-fermyon.md"
5+
url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/deploying.md"
66

77
---
88

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"spin": "nodemon --watch content --watch static --watch templates --watch spin-up-hub --ext html,md,rhai,hbs,css,js --verbose --legacy-watch --signal SIGINT --exec 'npm run build-index && npm run build-hub-index && spin up --file spin.toml --quiet --env PREVIEW_MODE=$PREVIEW_MODE'",
4141
"bundle-scripts": "parcel watch static/js/src/main.js --dist-dir static/js --no-source-maps",
4242
"styles": "parcel watch static/sass/styles.scss --dist-dir static/css",
43-
"test": "npx markdownlint-cli2 content/**/*.md \"#node_modules\" && npm run check-broken-links",
43+
"lint-markdown": "npx markdownlint-cli2 content/**/*.md \"#node_modules\"",
44+
"test": "npm run check-broken-links",
4445
"build-index": "node md_parser.mjs --dir=./content/ --out=./static/data.json --ignore=./content/api/**/*",
4546
"check-broken-links": ".build/check-broken-links.sh",
4647
"build-hub-index": "node hub_index_generator.mjs --dir=./content/api/hub/ --out=./static/hub-index-data.json --ignore=./content/api/hub/get_list.md,"

templates/sidebar.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100

101101
<a {{#if (active_project request.spin-full-url "/v3/plugin-authoring" )}} class="active" {{/if}} href="{{site.info.base_url}}/v3/plugin-authoring">Creating Spin Plugins</a>
102102
<a {{#if (active_project request.spin-full-url "/v3/template-authoring" )}} class="active" {{/if}} href="{{site.info.base_url}}/v3/template-authoring">Creating Spin Templates</a>
103-
<a href="https://github.com/fermyon/blob/main/docs/content/sips/index.md" target="_blank">Spin Improvement Proposals <img src="{{site.info.base_url}}/static/image/arrowexternal.svg" width="15" height="15"></a>
103+
<a href="https://github.com/spinframework/spin/blob/main/docs/content/sips/index.md" target="_blank">Spin Improvement Proposals <img src="{{site.info.base_url}}/static/image/arrowexternal.svg" width="15" height="15"></a>
104104
<a {{#if (active_project request.spin-full-url "/v3/extending-and-embedding" )}} class="active" {{/if}} href="{{site.info.base_url}}/v3/extending-and-embedding">Custom Triggers</a>
105105

106106
<hr>

0 commit comments

Comments
 (0)