2024-08-09 18:41:15 +02:00
|
|
|
name: mkdocs build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "main"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-08-29 15:25:40 +02:00
|
|
|
uses: actions/checkout@v4
|
2024-08-29 12:03:10 +02:00
|
|
|
- name: Mkdocs build
|
2024-08-29 16:56:43 +02:00
|
|
|
uses: ./.actions/mkdocs-build/ # Uses an action in this directory
|
|
|
|
- name: rsync files
|
|
|
|
uses: ./.actions/rsync/
|
|
|
|
# # working, but i don't need this
|
|
|
|
# - name: Create release
|
|
|
|
# uses: akkuman/gitea-release-action@v1
|
|
|
|
# with:
|
|
|
|
# files: |-
|
|
|
|
# _site/**
|
|
|
|
# token: "${{ secrets.RELEASE_TOKEN }}"
|
2024-09-02 18:43:29 +02:00
|
|
|
notification:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: build
|
|
|
|
steps:
|
|
|
|
- name: create payload var
|
2024-09-03 11:04:30 +02:00
|
|
|
run: |
|
2024-09-02 18:43:29 +02:00
|
|
|
PAYLOAD=$(cat << EOF
|
|
|
|
payload={
|
|
|
|
\"username\": \"gitea-bot\",
|
|
|
|
\"icon_url\": \"https://icinga.com/wp-content/uploads/2017/08/icon-core.png\",
|
|
|
|
\"text\": \"mkdocs build has just finished !\"
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
)
|
|
|
|
id: my_payload
|
2024-09-03 14:15:56 +02:00
|
|
|
- name: debug
|
|
|
|
run: |
|
2024-09-03 14:25:01 +02:00
|
|
|
echo "${{ vars.PAYLOAD }}"
|
|
|
|
echo "${{ vars.WEBHOOK_URL }}"
|
2024-09-02 18:43:29 +02:00
|
|
|
- name: curl webhook
|
2024-09-03 11:04:30 +02:00
|
|
|
run: |
|
2024-09-03 14:25:01 +02:00
|
|
|
curl --connect-timeout 30 --max-time 60 -s -S -X POST --data-urlencode "${{ vars.PAYLOAD }}" "${{ vars.WEBHOOK_URL }}"
|
2024-08-29 15:25:40 +02:00
|
|
|
|