-
Notifications
You must be signed in to change notification settings - Fork 76
37 lines (35 loc) · 1.19 KB
/
main.yml
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
name: Publish docs via GitHub Pages
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: 'true'
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ github.ref }}
path: .cache
restore-keys:
mkdocs-material
- run: pip install -r requirements.txt
- run: mkdocs gh-deploy --force
- name: Discord Commits
uses: Tedeapolis/[email protected]
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
if: "${{ env.WEBHOOK != '' }}"
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
message: "Successful commit to **{{ github.context.payload.repository.name}}**.\nDiff: {{ github.context.payload.compare }}"
embed: '{"title":"{{ commit.title }}","description":"{{ commit.description }}","url":"{{ commit.url }}","author":{"name":"{{ commit.author.name }}","icon_url":"https://github.com/{{ commit.author.username ?? commit.author.name }}.png"}}'