Skip to content

Process and Publish Contribution #40

Process and Publish Contribution

Process and Publish Contribution #40

Workflow file for this run

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
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: ""