-
Notifications
You must be signed in to change notification settings - Fork 18
66 lines (66 loc) · 2.45 KB
/
build.yml
File metadata and controls
66 lines (66 loc) · 2.45 KB
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
name: Build Site
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "30 9 * * *"
- cron: "5 16 * * 3,4"
jobs:
build_deploy:
if: ${{ github.repository == 'FlowFuse/website' }}
runs-on: ubuntu-latest
steps:
- name: Check out website repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: 'website'
- name: Check out FlowFuse/flowfuse repository (to access the docs)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: 'FlowFuse/flowfuse'
ref: main
path: 'flowfuse'
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
with:
client-id: ${{ secrets.GH_BOT_APP_ID }}
private-key: ${{ secrets.GH_BOT_APP_KEY }}
owner: ${{ github.repository_owner }}
- name: Check out FlowFuse/blueprint-library repository (to access the blueprints)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: 'FlowFuse/blueprint-library'
ref: main
path: 'blueprint-library'
token: ${{ steps.generate_token.outputs.token }}
- name: Install jq
run: sudo apt-get -qy install jq
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: 'npm'
cache-dependency-path: './website/package-lock.json'
- run: npm run docs
working-directory: 'website'
- run: npm run blueprints
working-directory: 'website'
- name: Commit Latest Docs
run: |
cd ./website
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add src/docs/* -A -f
git commit -a -m "Bot: update docs"
- name: Commit Latest Blueprints
run: |
cd ./website
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add src/blueprints/* -A -f
git commit -a -m "Bot: update blueprints"
- name: Push to 'live' branch
run: git push --force origin HEAD:live
working-directory: './website'