-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (39 loc) · 1.38 KB
/
build-from-source.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: rebuild index.html from sources repo
on:
workflow_dispatch:
inputs:
commitMessage:
description: "Commit message"
required: true
default: "update index.html"
committerName:
description: "Username for commit"
required: true
committerEmail:
description: "User email for commit"
required: true
# todo: setup repository_dispatch as well
jobs:
build-site:
runs-on: ubuntu-latest
steps:
# actions/checkout@v2 should be run first since it makes files created in cwd before not accessible
- uses: actions/checkout@v2
- name: get TiddlyWiki source
run: git clone https://github.com/TiddlyWiki/TiddlyWiki.git
- name: install dependencies and build index.html
run: |
cd ./TiddlyWiki
npm i
npm run build-site
cd ..
- name: move and commit resulting file
# todo: get the "build/cooked/" path bit from core repo itself
run: |
mv ./TiddlyWiki/build/cooked/*/index.html ./
git config --global user.name ${{ github.event.inputs.committerName }}
git config --global user.email ${{ github.event.inputs.committerEmail }}
git add ./index.html
git commit -m "${{ github.event.inputs.commitMessage }}"
git push
# todo: update other bits as well, like upgrade folder