Skip to content

Commit 8be8427

Browse files
committed
Add build action
1 parent b570dc9 commit 8be8427

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/build.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
path: website
16+
- uses: actions/checkout@v4
17+
with:
18+
repository: messageformat/messageformat
19+
ref: mf2-docs
20+
path: messageformat
21+
22+
- run: npm ci
23+
working-directory: messageformat
24+
- run: npx typedoc --out ../website/
25+
working-directory: messageformat
26+
- run: mv index.html mf2.html
27+
working-directory: website
28+
- run: mv _ index.html
29+
working-directory: website
30+
31+
- name: git config
32+
run: |
33+
git config --global user.name "github-actions[bot]"
34+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
35+
- run: git add .
36+
working-directory: website
37+
- name: git commit & push any changes
38+
run: |
39+
git diff-index --quiet HEAD || (git commit -m "Update from messageformat @ $(cd ../messageformat && git rev-parse --short HEAD)" && git push)
40+
working-directory: website

0 commit comments

Comments
 (0)