forked from finale-lua/lua-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.65 KB
/
deploy.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build and deploy scripts/docs
on:
push:
branches:
- 'master'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
path: './lua'
- run: 'rm -f ./lua/dist/*'
- name: Checkout docs website repository
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
repository: finale-lua/jw-lua-scripts-docs
path: './website'
token: ${{ secrets.NICK_PERSONAL_TOKEN }}
- name: build scripts
uses: ./lua/.github/actions/bundle
with:
source: ./lua/src
output: ./lua/dist
- name: build hashes
run: |
rm -rf ./lua/hash
mkdir ./lua/hash
cd ./lua/dist
for file in *; do sha512sum "$file" > "../hash/$(basename "$file" .lua).hash"; done
cd ../../
- name: parse scripts
uses: ./lua/.github/actions/get-metadata
with:
source: ./lua/src
output: ./website/src/lib/lib/script-data.json
- name: Generate the docs
uses: finale-lua/[email protected]
with:
input: './lua/src/library'
repositoryUrl: 'https://github.com/finale-lua/lua-scripts/tree/${{ github.ref }}/src/library'
output: './lua/docs/library'
- name: Generate the docs
uses: finale-lua/[email protected]
with:
input: './lua/src/mixin'
repositoryUrl: 'https://github.com/finale-lua/lua-scripts/tree/${{ github.ref }}/src/mixin'
output: './lua/docs/mixin'
- run: 'rm -rf website/docs'
- run: 'cp -R lua/docs website/docs'
- name: Commit & Push docs to website
uses: actions-js/[email protected]
with:
github_token: ${{ secrets.NICK_PERSONAL_TOKEN }}
directory: website
branch: main
repository: finale-lua/jw-lua-scripts-docs
- name: Commit & Push docs to this repo
uses: actions-js/[email protected]
with:
github_token: ${{ secrets.NICK_PERSONAL_TOKEN }}
directory: lua
branch: ${{ github.ref }}