Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BDFD Wiki Update Part 3 - Big Update #438

Open
wants to merge 1,719 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1719 commits
Select commit Hold shift + click to select a range
f92f107
Update general.css
Rainb0wKey Jan 15, 2025
a2e4745
Update discord-messages.css
Rainb0wKey Jan 15, 2025
5f9d58c
Update changelog.css
Rainb0wKey Jan 15, 2025
19c56a9
Update style.css
Rainb0wKey Jan 15, 2025
3d788c8
Update randomCategoryID.md
Rainb0wKey Jan 15, 2025
331bdd8
Update randomRoleID.md
Rainb0wKey Jan 15, 2025
413b7c7
Update playground.js
Rainb0wKey Jan 15, 2025
94ece53
Update playground.js
Rainb0wKey Jan 15, 2025
6a78145
Update randomString.md
Rainb0wKey Jan 15, 2025
a3ec085
Update style.css
Rainb0wKey Jan 15, 2025
7dbe852
Update changelog.css
Rainb0wKey Jan 15, 2025
cc9f5f0
Update afkChannelID.md
Bottomloader Jan 15, 2025
ab02840
Update getServerInviteComplex.md
Rainb0wKey Jan 15, 2025
3958a0d
Update getServerInviteComplex.md
Rainb0wKey Jan 15, 2025
1e94c8d
Update getServerInviteComplex.md
Rainb0wKey Jan 16, 2025
a5a652f
Update addResponseEmbed.md
Rainb0wKey Jan 16, 2025
c6bd645
Update setResponseMessage.md
Rainb0wKey Jan 16, 2025
0c5650b
Update toLowercase.md
Rainb0wKey Jan 16, 2025
e381b31
Update addResponseEmbed.md
Rainb0wKey Jan 16, 2025
04eec2a
Update setResponseMessage.md
Rainb0wKey Jan 16, 2025
3283225
Update toLowercase.md
Rainb0wKey Jan 16, 2025
20b1b9f
Update addTimestamp.md
Rainb0wKey Jan 16, 2025
ae6accb
Update authorURL.md
Rainb0wKey Jan 16, 2025
fd5b697
Update index.hbs
Rainb0wKey Jan 16, 2025
97c4e6b
Update playground.js
Rainb0wKey Jan 16, 2025
db8488d
Update discord-messages.css
Rainb0wKey Jan 16, 2025
5cddbde
Update playground.js
Rainb0wKey Jan 16, 2025
9f03678
Update addTimestampComplex.md
Rainb0wKey Jan 16, 2025
8e06012
Update addTimestampComplex.md
Rainb0wKey Jan 16, 2025
3aad3d7
Update addTimestampComplex.md
Rainb0wKey Jan 16, 2025
c5f6c1e
Update apply-settings.js
Rainb0wKey Jan 16, 2025
910fda0
Update addTimestampComplex.md
Rainb0wKey Jan 16, 2025
180edf5
Update addTimestampComplex.md
Rainb0wKey Jan 16, 2025
e120f59
Update changeCooldownTime.md
Rainb0wKey Jan 16, 2025
2682701
Update channelExists.md
Rainb0wKey Jan 16, 2025
78fa3b3
Update guildID.md
Rainb0wKey Jan 16, 2025
987bd28
Update apply-settings.js
Rainb0wKey Jan 16, 2025
e65141c
Update general.css
Rainb0wKey Jan 16, 2025
bac1d6c
Create emojiName.md
Rainb0wKey Jan 16, 2025
d0445d3
Create emojiExists.md
Rainb0wKey Jan 16, 2025
3a62aea
Update SUMMARY.md
Rainb0wKey Jan 16, 2025
f29028e
Update bdscript
Bottomloader Jan 16, 2025
1a93d24
Update SUMMARY.md
Bottomloader Jan 16, 2025
696db17
Update isEmojiAnimated.md
Rainb0wKey Jan 16, 2025
cbfae93
Update afkChannelID.md
Bottomloader Jan 16, 2025
b3294d9
Update systemChannelID.md
Bottomloader Jan 16, 2025
2b18165
Update systemChannelID.md
Bottomloader Jan 16, 2025
ca9d5c4
Update systemChannelID.md
Bottomloader Jan 16, 2025
84a7d13
Update afkChannelID.md
Bottomloader Jan 16, 2025
8a5676d
Update afkChannelID.md
Bottomloader Jan 16, 2025
b594b37
Update systemChannelID.md
Bottomloader Jan 16, 2025
3c2c8dc
Update afkChannelID.md
Bottomloader Jan 16, 2025
657c7fe
Update afkChannelID.md
Rainb0wKey Jan 16, 2025
ae762d9
Update SUMMARY.md
Rainb0wKey Jan 16, 2025
7bf3f6b
Update systemChannelID.md
Bottomloader Jan 16, 2025
1586687
Update afkChannelID.md
Rainb0wKey Jan 17, 2025
c99839d
Update systemChannelID.md
Bottomloader Jan 17, 2025
19f5845
Update systemChannelID.md
Bottomloader Jan 17, 2025
f0f19e7
Update systemChannelID.md
Bottomloader Jan 17, 2025
c426e30
Create threadUserCount.md
Rainb0wKey Jan 17, 2025
bf47773
Create threadMessageCount
Rainb0wKey Jan 17, 2025
6855a85
Update threadMessageCount
Rainb0wKey Jan 17, 2025
4d63132
Update SUMMARY.md
Rainb0wKey Jan 17, 2025
7de1b87
Update afkChannelID.md
Rainb0wKey Jan 17, 2025
5440be8
Rename threadMessageCount to threadMessageCount.md
Rainb0wKey Jan 17, 2025
7af8aba
Update addEmoji.md
Rainb0wKey Jan 17, 2025
e2502cc
Update afkChannelID.md
Rainb0wKey Jan 17, 2025
cd712b5
Update systemChannelID.md
Rainb0wKey Jan 17, 2025
7576702
Update afkChannelID.md
Rainb0wKey Jan 17, 2025
40a7f7b
Update addEmoji.md
Rainb0wKey Jan 17, 2025
0da4796
Update addEmoji.md
Rainb0wKey Jan 17, 2025
27b2766
Update discord-messages.css
Rainb0wKey Jan 17, 2025
6d3223d
Update addEmoji.md
Rainb0wKey Jan 17, 2025
dcd748e
Update addEmoji.md
Rainb0wKey Jan 17, 2025
87d35e8
Update addEmoji.md
Rainb0wKey Jan 17, 2025
445bc04
Update addEmoji.md
Rainb0wKey Jan 17, 2025
7f5661b
Update addEmoji.md
Rainb0wKey Jan 17, 2025
abd6d9e
Update categoryChannels.md
Rainb0wKey Jan 17, 2025
92dc69d
Update CHANGELOG.md
Rainb0wKey Jan 17, 2025
dc402ad
Update CHANGELOG.md
Rainb0wKey Jan 17, 2025
7c87f7a
Create voiceUserLimit.md
Rainb0wKey Jan 17, 2025
6ee2a2a
Update SUMMARY.md
Rainb0wKey Jan 17, 2025
b6d6d74
Update voiceUserLimit.md
Rainb0wKey Jan 17, 2025
f0b60d2
Update systemChannelID.md
Bottomloader Jan 17, 2025
a73dd05
Update afkChannelID.md
Bottomloader Jan 17, 2025
d99c3f7
Update premium
Bottomloader Jan 17, 2025
ecc37e4
Rename $logQuota to logQuota
Bottomloader Jan 17, 2025
c21c954
Update SUMMARY.md
Bottomloader Jan 17, 2025
7015507
Update logQuota
Bottomloader Jan 17, 2025
45581b3
Create log.md
Rainb0wKey Jan 17, 2025
b848838
Update log.md
Rainb0wKey Jan 17, 2025
930e57b
Update log.md
Rainb0wKey Jan 17, 2025
51db88b
Update log.md
Rainb0wKey Jan 17, 2025
139cf53
Update SUMMARY.md
Rainb0wKey Jan 17, 2025
e0b2bcf
Update logQuota
Rainb0wKey Jan 17, 2025
4bbfbd6
Update aiQuota.md
Rainb0wKey Jan 17, 2025
e148c02
Update messageContains.md
Rainb0wKey Jan 17, 2025
fc6b112
Rename logQuota to logQuota.md
Rainb0wKey Jan 17, 2025
5adb2e7
Update general.css
Rainb0wKey Jan 17, 2025
f90c873
Update bdfdCreation.md
Rainb0wKey Jan 17, 2025
80f9b8a
Update log.md
Rainb0wKey Jan 17, 2025
1ffb078
Create suppressErrorLogging.md
Rainb0wKey Jan 17, 2025
3fba974
Update SUMMARY.md
Rainb0wKey Jan 17, 2025
e5334ae
Update suppressErrorLogging.md
Rainb0wKey Jan 17, 2025
c2a9f9b
Update suppressErrorLogging.md
Rainb0wKey Jan 17, 2025
3192a25
Update log.md
Rainb0wKey Jan 17, 2025
721e4e3
Update log.md
Rainb0wKey Jan 17, 2025
4057398
Update log.md
Rainb0wKey Jan 17, 2025
8d204f8
Update logQuota.md
Rainb0wKey Jan 17, 2025
558ee51
Update suppressErrorLogging.md
Rainb0wKey Jan 17, 2025
050cf02
Update aiQuota.md
Rainb0wKey Jan 17, 2025
fde31d5
Update ai.md
Rainb0wKey Jan 17, 2025
317b43c
Update aiQuota.md
Rainb0wKey Jan 17, 2025
76b8556
Update log.md
Rainb0wKey Jan 17, 2025
12c1ad7
Update log.md
Rainb0wKey Jan 17, 2025
c823a2e
Update suppressErrorLogging.md
Rainb0wKey Jan 17, 2025
156087a
Update log.md
Rainb0wKey Jan 18, 2025
742e693
Update CHANGELOG.md
Rainb0wKey Jan 18, 2025
28337d9
Update CHANGELOG.json
Rainb0wKey Jan 18, 2025
1335061
Update log.md
Rainb0wKey Jan 18, 2025
a275f97
Update suppressErrorLogging.md
Rainb0wKey Jan 18, 2025
81fb591
Create byteCount.md
Rainb0wKey Jan 18, 2025
39826f8
Update playground.js
Rainb0wKey Jan 18, 2025
a64b740
Update SUMMARY.md
Rainb0wKey Jan 18, 2025
9bb26d7
Update userInfo.md
Rainb0wKey Jan 18, 2025
8007127
Update userAvatar.md
Rainb0wKey Jan 18, 2025
80d4770
Update onlyIfMessageContains.md
Rainb0wKey Jan 18, 2025
d17e011
Update or.md
Rainb0wKey Jan 18, 2025
de32f2a
Update and.md
Rainb0wKey Jan 18, 2025
cc00fd2
Update getCustomStatus.md
Rainb0wKey Jan 18, 2025
e9b67d0
Update getUserStatus.md
Rainb0wKey Jan 18, 2025
dfc2c37
Update getUserStatus.md
Rainb0wKey Jan 18, 2025
9be8f20
Update getUserStatus.md
Rainb0wKey Jan 18, 2025
45e80b8
Update getUserStatus.md
Rainb0wKey Jan 18, 2025
014cfc2
Update hostingExpireTime.md
Rainb0wKey Jan 18, 2025
ff4a64c
Update hostingExpireTimeComplex.md
Rainb0wKey Jan 18, 2025
161e118
Update hostingExpireTimeComplex.md
Rainb0wKey Jan 18, 2025
e6cd76b
Update hypesquad.md
Rainb0wKey Jan 18, 2025
fe458d2
Update if.md
Rainb0wKey Jan 18, 2025
5afd4ea
Update onMessageDelete.md
Rainb0wKey Jan 18, 2025
695b482
Update elseif.md
Rainb0wKey Jan 18, 2025
daa5ece
Update else.md
Rainb0wKey Jan 18, 2025
9e6d3a6
Update clear.md
Rainb0wKey Jan 18, 2025
7544a71
Update clearComplex.md
Rainb0wKey Jan 18, 2025
54d0b7c
Update ifStatements.md
Rainb0wKey Jan 18, 2025
f973148
Update isSlash.md
Rainb0wKey Jan 18, 2025
3f969ef
Update isSlash.md
Rainb0wKey Jan 18, 2025
f329ec8
Update isNSFW.md
Rainb0wKey Jan 18, 2025
b887407
Update getVar.md
Rainb0wKey Jan 18, 2025
829748b
Update hasRole.md
Rainb0wKey Jan 18, 2025
6b00b77
Update isNSFW.md
Rainb0wKey Jan 18, 2025
28f85ee
Update isTicket.md
Rainb0wKey Jan 18, 2025
9c5deba
Update isBanned.md
Rainb0wKey Jan 18, 2025
dbcf135
Update roleInfo.md
Rainb0wKey Jan 18, 2025
d7587db
Update slowmode.md
Rainb0wKey Jan 18, 2025
fceaa8b
Update isHoisted.md
Rainb0wKey Jan 18, 2025
edb9649
Update onBanAdd.md
Rainb0wKey Jan 18, 2025
9653402
Update newTicket.md
Rainb0wKey Jan 18, 2025
eb3805f
Update dmComplex.md
Rainb0wKey Jan 18, 2025
68d48cd
Update isTimedOut.md
Rainb0wKey Jan 18, 2025
b165894
Update modifyRole.md
Rainb0wKey Jan 18, 2025
a06c9aa
Update editThread.md
Rainb0wKey Jan 18, 2025
7228c43
Update editThread.md
Rainb0wKey Jan 18, 2025
8e57360
Update roleExists.md
Rainb0wKey Jan 18, 2025
c37c545
Update editMessage.md
Rainb0wKey Jan 18, 2025
09ca187
Update resetUserVar.md
Rainb0wKey Jan 18, 2025
a986ecd
Update isMentionable.md
Rainb0wKey Jan 18, 2025
28a48d9
Update globalCooldown.md
Rainb0wKey Jan 18, 2025
27b6c02
Update serverCooldown.md
Rainb0wKey Jan 18, 2025
963b6a6
Update messageComplex.md
Rainb0wKey Jan 18, 2025
d90eed4
Update webhooks.md
Rainb0wKey Jan 18, 2025
47af218
Update globalUserLeaderboard.md
Rainb0wKey Jan 18, 2025
e28b842
Update modifyChannel.md
Rainb0wKey Jan 18, 2025
e2ef58f
Update guildIDComplex.md
Rainb0wKey Jan 18, 2025
3565639
Update onLeave.md
Rainb0wKey Jan 18, 2025
9f4b9d1
Update noMentionMessageComplex.md
Rainb0wKey Jan 18, 2025
d7d7885
Update modifyChannel.md
Rainb0wKey Jan 18, 2025
3147d90
Update isUserDMEnabled.md
Rainb0wKey Jan 18, 2025
9582e13
Update nicknameComplex.md
Rainb0wKey Jan 18, 2025
7fa8029
Update onMessageDelete.md
Rainb0wKey Jan 18, 2025
f7197b4
Update removeSplitTextElement.md
Rainb0wKey Jan 18, 2025
9a3c8bc
Update resetChannelVar.md
Rainb0wKey Jan 18, 2025
a56f918
Update onJoined.md
Rainb0wKey Jan 18, 2025
a7db4d7
Update aboutModals.md
Rainb0wKey Jan 18, 2025
dbd289a
Update suppressErrorLogging.md
Rainb0wKey Jan 18, 2025
d2dd1b8
Update log.md
Rainb0wKey Jan 18, 2025
d89814e
Update byteCount.md
Rainb0wKey Jan 18, 2025
8eb22b7
Update byteCount.md
Rainb0wKey Jan 18, 2025
035922c
Update book.toml
Rainb0wKey Jan 18, 2025
49d6ddd
Update code-hg.js
Rainb0wKey Jan 18, 2025
4a170d4
Update code-hg.js
Rainb0wKey Jan 18, 2025
9351801
Update addEmoji.md
Rainb0wKey Jan 18, 2025
926681a
Update suppressErrorLogging.md
Rainb0wKey Jan 19, 2025
c9fa5e1
Update api.md
Rainb0wKey Jan 19, 2025
1a48a65
Update roleCount.md
Rainb0wKey Jan 19, 2025
d29a657
Update api.md
Rainb0wKey Jan 19, 2025
a4b0f92
Update afkChannelID.md
Bottomloader Jan 20, 2025
69ada77
Update systemChannelID.md
Bottomloader Jan 20, 2025
7316f01
Update afkChannelID.md
Bottomloader Jan 20, 2025
0b77deb
Update systemChannelID.md
Bottomloader Jan 20, 2025
83c482a
Update introduction.md
Rainb0wKey Jan 22, 2025
830947c
Update CHANGELOG.md
Rainb0wKey Jan 22, 2025
2667f53
Update CHANGELOG.json
Rainb0wKey Jan 22, 2025
84a9b01
Update bdscript
Bottomloader Jan 24, 2025
826c17e
Create commandTrigger.md
Rainb0wKey Jan 24, 2025
3c39928
Update SUMMARY.md
Bottomloader Jan 24, 2025
194d6c2
Update SUMMARY.md
Bottomloader Jan 24, 2025
e6f9dac
Create commanName.md
Rainb0wKey Jan 24, 2025
4f88f51
Update SUMMARY.md
Rainb0wKey Jan 24, 2025
e6a53b1
Update afkChannelID.md
Rainb0wKey Jan 24, 2025
b70fc99
Update rulesChannelID.md
Rainb0wKey Jan 24, 2025
58555c2
Update systemChannelID.md
Rainb0wKey Jan 24, 2025
95e838e
Update commandsCount.md
Rainb0wKey Jan 24, 2025
ad0e73e
Update and rename commanName.md to commandName.md
Rainb0wKey Jan 24, 2025
baaf04b
Update commandTrigger.md
Rainb0wKey Jan 24, 2025
5c77d99
Update commandName.md
Rainb0wKey Jan 24, 2025
ba033a3
Create commandFolder.md
Rainb0wKey Jan 24, 2025
3b7fe65
Update SUMMARY.md
Rainb0wKey Jan 24, 2025
3c619f2
Update style.css
Rainb0wKey Jan 25, 2025
24fa0a9
Fixed sidebar-toggle's size and position with different text sizes
Rainb0wKey Jan 25, 2025
65c6795
Update style.css
Rainb0wKey Jan 25, 2025
5a0f53c
Fixed reset hg button
Rainb0wKey Jan 25, 2025
36ab517
Fixed discord message preview setting position
Rainb0wKey Jan 25, 2025
12f9dfd
Added support for mobile
Rainb0wKey Jan 25, 2025
e2a85bb
Update chrome.css
Rainb0wKey Jan 25, 2025
1e12642
bug fix
Rainb0wKey Jan 25, 2025
e71f094
Update chrome.css
Rainb0wKey Jan 25, 2025
91c2bac
New BDFD logo
Rainb0wKey Jan 25, 2025
9b7cfa2
Update README.md
Rainb0wKey Jan 25, 2025
a27c1cc
Update README.md
Rainb0wKey Jan 25, 2025
a786607
Update README.md
Rainb0wKey Jan 25, 2025
7963a3e
Update README.md
Rainb0wKey Jan 25, 2025
11cee8f
Update README.md
Rainb0wKey Jan 25, 2025
a67fd68
Update README.md
Rainb0wKey Jan 25, 2025
1131615
Update README.md
Rainb0wKey Jan 25, 2025
7fb6f5f
Create afkTimeout.md
Rainb0wKey Jan 28, 2025
aa41915
Update SUMMARY.md
Rainb0wKey Jan 28, 2025
9785bfd
Update afkTimeout.md
Rainb0wKey Jan 28, 2025
42ad85c
Update afkChannelID.md
Rainb0wKey Jan 28, 2025
0cc5632
Update afkTimeout.md
Rainb0wKey Jan 28, 2025
6ff2de4
Update afkTimeout.md
Rainb0wKey Jan 28, 2025
2d663d5
Update afkTimeout.md
Rainb0wKey Jan 28, 2025
046e9b4
Update rulesChannelID.md
Rainb0wKey Jan 28, 2025
c3ef9a8
Update bdscript
Bottomloader Jan 30, 2025
02d8902
Update SUMMARY.md
Bottomloader Jan 30, 2025
ddd3b95
Update getSlowmode.md
Bottomloader Jan 31, 2025
5bf90f3
Update getSlowmode.md
Rainb0wKey Jan 31, 2025
4747ee9
Update rulesChannelID.md
Rainb0wKey Jan 31, 2025
aa9a9d9
Update afkTimeout.md
Rainb0wKey Jan 31, 2025
e7ec50f
Update getSlowmode.md
Rainb0wKey Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
306 changes: 153 additions & 153 deletions .github/workflows/book_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,153 +1,153 @@
name: Wiki Deploy

on:
push:
branches:
- dev
- prod

jobs:
build:
name: Build wiki
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
env:
GH_TOKEN: ${{ github.token }}
run: |-
gh release download -R rust-lang/mdBook -p mdbook-*-x86_64-unknown-linux-gnu.tar.gz
gh release download -R tommilligan/mdbook-admonish -p mdbook-admonish-*-x86_64-unknown-linux-gnu.tar.gz
gh release download -R NilPointer-Software/mdbook-discord-components -p mdbook-discord-components-*.tar.gz

for file in *.tar.gz
do tar xzf "$file" -C /usr/local/bin
rm $file
done

- name: Build book
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
run: |-
mdbook-admonish install --css-dir src/theme
mdbook build

- name: Upload book
uses: actions/upload-artifact@v4
with:
name: book
path: book

deploy-prod:
name: Deploy production wiki
needs: build
if: github.ref_name == 'prod'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Prepare to fetch book
run: |-
mv nightly ..
rm -rf *

- name: Fetch book artifact
uses: actions/download-artifact@v4
with:
name: book

- name: Deploy
run: |-
mv ../nightly .
git add -A
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages

deploy-nightly:
name: Deploy nightly wiki
needs: build
if: github.ref_name == 'dev'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Prepare to fetch book
run: rm -rf nightly/*

- name: Fetch book artifact
uses: actions/download-artifact@v4
with:
name: book
path: nightly

- name: Deploy
run: |-
git add -A
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git commit -m "Deploy nightly $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages

notify-discord:
name: Send notification
needs: [deploy-prod, deploy-nightly]
if: ${{ !failure() }}
runs-on: ubuntu-latest
env:
TYPE: Nightly
LINK: nightly
steps:
- name: Prepare notification
env:
RAW: ${{ github.event.head_commit.message }}
run: |-
echo "MESSAGE<<EOF" >> $GITHUB_ENV
RAW=$(echo "$RAW" | sed -r '/^\s*$/d')
echo "$RAW" | head -n 10 | sed ':a;N;$!ba;s/\n/\n /g' >> $GITHUB_ENV
if [ $(echo "$RAW" | wc -l) -gt 10 ]; then
echo " ..." >> $GITHUB_ENV
fi
echo "EOF" >> $GITHUB_ENV

- name: Set notification type
if: github.ref_name == 'prod'
run: |-
echo "TYPE=Production" >> $GITHUB_ENV
echo "LINK=" >> $GITHUB_ENV

- name: Send notification
uses: MineBartekSA/[email protected]
with:
webhook: ${{ secrets.WEBHOOK }}
embed: |-
title: "${{ env.TYPE }} Wiki Update"
color: 10001644
author:
name: ${{ github.event.head_commit.author.username }}
url: https://github.com/${{ github.event.head_commit.author.username }}
icon_url: https://github.com/${{ github.event.head_commit.author.username }}.png
thumbnail:
url: https://botdesignerdiscord.com/logo512.png
description: |-
**__Content__**

${{ env.MESSAGE }}
component: |-
- type: 2
style: 5
label: View commit
url: ${{ github.event.head_commit.url }}
- type: 2
style: 5
label: Preview site
url: https://nilpointer-software.github.io/bdfd-wiki/${{ env.LINK }}
name: Wiki Deploy
on:
push:
branches:
- dev
- prod
jobs:
build:
name: Build wiki
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
env:
GH_TOKEN: ${{ github.token }}
run: |-
gh release download -R rust-lang/mdBook -p mdbook-*-x86_64-unknown-linux-gnu.tar.gz
gh release download -R tommilligan/mdbook-admonish -p mdbook-admonish-*-x86_64-unknown-linux-gnu.tar.gz
gh release download -R NilPointer-Software/mdbook-discord-components -p mdbook-discord-components-*.tar.gz
for file in *.tar.gz
do tar xzf "$file" -C /usr/local/bin
rm $file
done
- name: Build book
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
run: |-
mdbook-admonish install --css-dir src/theme
mdbook build
- name: Upload book
uses: actions/upload-artifact@v4
with:
name: book
path: book
deploy-prod:
name: Deploy production wiki
needs: build
if: github.ref_name == 'prod'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Prepare to fetch book
run: |-
mv nightly ..
rm -rf *
- name: Fetch book artifact
uses: actions/download-artifact@v4
with:
name: book
- name: Deploy
run: |-
mv ../nightly .
git add -A
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages
deploy-nightly:
name: Deploy nightly wiki
needs: build
if: github.ref_name == 'dev'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Prepare to fetch book
run: rm -rf nightly/*
- name: Fetch book artifact
uses: actions/download-artifact@v4
with:
name: book
path: nightly
- name: Deploy
run: |-
git add -A
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git commit -m "Deploy nightly $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages
notify-discord:
name: Send notification
needs: [deploy-prod, deploy-nightly]
if: ${{ !failure() }}
runs-on: ubuntu-latest
env:
TYPE: Nightly
LINK: nightly
steps:
- name: Prepare notification
env:
RAW: ${{ github.event.head_commit.message }}
run: |-
echo "MESSAGE<<EOF" >> $GITHUB_ENV
RAW=$(echo "$RAW" | sed -r '/^\s*$/d')
echo "$RAW" | head -n 10 | sed ':a;N;$!ba;s/\n/\n /g' >> $GITHUB_ENV
if [ $(echo "$RAW" | wc -l) -gt 10 ]; then
echo " ..." >> $GITHUB_ENV
fi
echo "EOF" >> $GITHUB_ENV
- name: Set notification type
if: github.ref_name == 'prod'
run: |-
echo "TYPE=Production" >> $GITHUB_ENV
echo "LINK=" >> $GITHUB_ENV
- name: Send notification
uses: MineBartekSA/[email protected]
with:
webhook: ${{ secrets.WEBHOOK }}
embed: |-
title: "${{ env.TYPE }} Wiki Update"
color: 6504371
author:
name: ${{ github.event.head_commit.author.username }}
url: https://github.com/${{ github.event.head_commit.author.username }}
icon_url: https://github.com/${{ github.event.head_commit.author.username }}.png
thumbnail:
url: https://app.botdesignerdiscord.com/icons/Icon-512.png
description: |-
**__Content__**
${{ env.MESSAGE }}
component: |-
- type: 2
style: 5
label: View commit
url: ${{ github.event.head_commit.url }}
- type: 2
style: 5
label: Preview site
url: https://wiki.botdesignerdiscord.com/nightly/${{ env.LINK }}
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
book
mdbook
mdbook.exe
mdbook-discord-components
book
mdbook
mdbook.exe
mdbook-discord-components
.idea
Loading