Skip to content

Commit bd2c377

Browse files
committed
Add build & deploy workflow
1 parent ab3bd82 commit bd2c377

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.github/workflows/build.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build & deploy
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "*"
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pages: write
15+
id-token: write
16+
strategy:
17+
fail-fast: true
18+
outputs:
19+
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }}
20+
steps:
21+
- name: Checkout Source
22+
uses: actions/checkout@v4
23+
- name: Install Node 20
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
- name: Install Dependencies
28+
run: npm ci
29+
- name: Build website
30+
run: npm run build
31+
- name: Upload static files as artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: static-files
35+
path: public/
36+
37+
publish:
38+
name: Publish
39+
needs:
40+
- build
41+
if: github.ref_name == 'main'
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout Source
45+
uses: actions/checkout@v4
46+
- name: Deploy to Github Pages
47+
uses: actions/deploy-pages@v4
48+
with:
49+
artifact_name: static-files
50+

.prettierrc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ experimentalTernaries: true
1010

1111
# Overrided config
1212
overrides:
13-
- files: ["*.md", "*.json", "*.yaml"]
13+
- files: ["*.md", "*.json", "*.yaml", "*.yml"]
1414
options:
1515
tabWidth: 2
1616
singleQuote: false

0 commit comments

Comments
 (0)