-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (75 loc) · 2.21 KB
/
Convert.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
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
71
72
73
74
75
name: Contribution Processor
run-name: Process and Publish Contribution
on:
push:
branches:
- main
paths:
- 'public/features/**/hub.md'
pull_request:
branches:
- main
paths:
- 'public/features/**/hub.md'
jobs:
process_hub_file:
runs-on: ubuntu-latest
name: Process Hub and Update Search
steps:
- run: echo "${{ github.event_name }} event detected."
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: '2'
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install
run: npm ci
- id: file_chnages
uses: trilom/[email protected]
with:
output: 'json'
fileOutput: 'json'
- name: Show files changed
run: cat $HOME/files.json
- name: "Absolutify Links"
id: linking
run: |
node ./scripts/pipeline.js \
--phase link
- name: "Create tracking file"
id: tracking
run: echo "[]" > $HOME/tracker.json
- name: "Transform files"
id: html-transform
run: |
node ./scripts/pipeline.js \
--phase transform
- name: "Show tracked entries"
run: cat $HOME/tracker.json
- name: Update search tools collection
id: search
run: |
node ./scripts/pipeline.js \
--phase searchupdate \
--searchFile $(pwd)/public/data/pages/searchToolsCollection.json
- name: Commit changes and deploy
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add public/features/ public/data/pages/searchToolsCollection.json
git commit -m "Convert hub.md and update search"
git push
git status
git config pull.rebase true
git fetch origin
git checkout gh-pages
git pull origin main --no-edit --allow-unrelated-histories
- name: Install Dependencies
run: npm ci
- name: Deploy to GH Pages
run: npm run deploy
env:
CI: ""