Skip to content

Publish

Publish #126

Workflow file for this run

---
name: Documentation
on:
push:
branches:
- 3.x
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_COMMIT }}
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
ref: '3.x'
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_COMMIT }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install packages
run: npm install
- name: Install typescript
run: npm install -g typescript
- name: Build Typescript
run: npm run compile
- name: Build Typedoc
run: npm run typedoc
- name: Update markdown files
run: |
cd docs
../scripts/adjustMarkdown.sh
- name: Build example markdown
run: node scripts/generateExample.mjs
- name: Final Adjustment to files
run: |
mv docs/packages.md docs/HOME.md
mv docs/EXAMPLES.md .
rm -rf docs/index.md docs/docs.json
- name: Sync Wiki to Docs
uses: newrelic/wiki-sync-action@main
with:
source: docs
destination: wiki
token: ${{ secrets.GH_TOKEN_COMMIT}}
gitAuthorName: github-actions
gitAuthorEmail: github-actions@github.com
branch: main
- name: Copy and commit example markdown
continue-on-error: true
run: |
git config --local user.name github-actions
git config --local user.email github-actions@github.com
git add EXAMPLES.md
git commit -m "docs: updated example markdown"
git push --force-with-lease