This repository was archived by the owner on Apr 23, 2026. It is now read-only.
forked from Roblox-Indie-Wikis/irwa-website
-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (67 loc) · 3.28 KB
/
Copy pathsync-docs.yml
File metadata and controls
76 lines (67 loc) · 3.28 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
67
68
69
70
71
72
73
74
75
76
name: Sync External Docs
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
retrieve-file:
runs-on: ubuntu-latest
steps:
- name: Checkout your repo
uses: actions/checkout@v4
- name: Fetch USAGE.md and add Front Matter
run: |
# Create the nested directory
mkdir -p pages
# Download the raw file
curl -s https://raw.githubusercontent.com/Roblox-Indie-Wikis/mediawiki-extensions-RobloxAPI/master/USAGE.md -o usage_raw.md
# Remove the TOC and keep content starting from "## Basic Usage"
if ! grep -q '^## Basic Usage' usage_raw.md; then
echo "Expected heading '## Basic Usage' not found in USAGE.md" >&2
exit 1
fi
sed -n '/^## Basic Usage/,$p' usage_raw.md > usage_no_toc.md
# Create the final file with Jekyll Front Matter
{
echo "---"
echo "layout: page"
echo "body_class: page-template robloxapi toc-enabled bg-include page-robloxapi"
echo "title: Roblox API Documentation"
echo "description: Documentation for the RobloxAPI extension, which provides easy access to the Roblox API via parser functions."
echo "redirect_from: /docs/robloxapi"
echo "permalink: /robloxapi/"
echo "image: /assets/promofiles/RobloxAPIMainThumbnail.png"
echo "twitter:"
echo " card: summary_large_image"
echo "---"
echo "# Roblox API Documentation"
echo ""
echo "<figure class="post__image align-center"><img loading="lazy" src="{{ "/assets/promofiles/RobloxAPIMainThumbnail.png" | relative_url }}" alt="" aria-hidden="true" width="800" class="img-rounded aspect-ratio-169 size-cover"></figure>"
echo ""
echo "The RobloxAPI extension provides easy access to the Roblox API via parser functions. The Roblox API is generally very poorly documented, and using the ExternalData extension or Lua modules can be a steep learning curve which may not be viable. This extension aims to make it easy for you to grab data from Roblox and put it on your wiki, using simple parser functions."
echo "{% raw %}"
cat usage_no_toc.md
echo "{% endraw %}"
} > pages/robloxapi.md
# Clean up temporary files
rm usage_raw.md usage_no_toc.md
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: sync external robloxapi docs"
committer: GitHub <noreply@github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
branch: patch/sync-docs
title: "Update Roblox API Documentation"
body: "This is an automated PR to sync documentation with Roblox-Indie-Wikis/mediawiki-extensions-RobloxAPI."
delete-branch: true
- name: Auto-merge PR
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge "${{ steps.cpr.outputs.pull-request-number }}" --squash --admin
env:
GH_TOKEN: ${{ secrets.ADMIN_GH_TOKEN }}