Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(.github): add build.yml; defer linting for now #28

Merged
merged 3 commits into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build
on:
pull_request:
branches: [main]

env:
BART_VERSION: v0.10.0

jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup Spin
uses: fermyon/actions/spin/setup@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install bart
run: |
curl -LOs https://github.com/fermyon/bartholomew/releases/download/${{ env.BART_VERSION }}/bart-${{ env.BART_VERSION }}-linux-amd64.tar.gz
tar zxvf bart-${{ env.BART_VERSION }}-linux-amd64.tar.gz
mv bart /usr/local/bin
- name: Check Docs
run: |
bart check --shortcodes shortcodes content/* && bart check --shortcodes shortcodes content/**/*

- name: Install npm packages
run: |
npm ci
npm ci --prefix ./spin-up-hub

- name: Build app
run: |
spin build

# TODO: re-enable after figuring out how to confgure the current linting tool; or choose another.
# By default, the current tool appears very aggressive, presenting errors for eg
# multiple consecutive new-lines, non-conforming title capitalization, etc
#
# - name: Lint markdown
# run: |
# npm run lint-markdown

- name: Run npm tests
run: |
npm test
2 changes: 1 addition & 1 deletion content/v2/contributing-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Reference resources are merely a dry description; describing the feature in its

### 4. Explanation

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).
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.

## Technical Documentation Procedure

Expand Down
2 changes: 1 addition & 1 deletion content/v3/contributing-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Reference resources are merely a dry description; describing the feature in its

### 4. Explanation

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).
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.

## Technical Documentation Procedure

Expand Down
2 changes: 1 addition & 1 deletion content/v3/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ title = "Deploy Options"
template = "main"
date = "2023-11-04T00:00:01Z"
[extra]
url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/deploying-to-fermyon.md"
url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/deploying.md"

---

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"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'",
"bundle-scripts": "parcel watch static/js/src/main.js --dist-dir static/js --no-source-maps",
"styles": "parcel watch static/sass/styles.scss --dist-dir static/css",
"test": "npx markdownlint-cli2 content/**/*.md \"#node_modules\" && npm run check-broken-links",
"lint-markdown": "npx markdownlint-cli2 content/**/*.md \"#node_modules\"",
"test": "npm run check-broken-links",
"build-index": "node md_parser.mjs --dir=./content/ --out=./static/data.json --ignore=./content/api/**/*",
"check-broken-links": ".build/check-broken-links.sh",
"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,"
Expand Down
2 changes: 1 addition & 1 deletion templates/sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

<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>
<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>
<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>
<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>
<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>

<hr>
Expand Down
Loading