wiki/.gitea/workflows/build.yml
Ludovic Cartier d95c30e7ef
All checks were successful
mkdocs build / build (push) Successful in 4s
mkdocs build / notification (push) Successful in 3s
update debug
2024-09-03 14:25:01 +02:00

48 lines
1.2 KiB
YAML

name: mkdocs build
on:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Mkdocs build
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 }}"
notification:
runs-on: ubuntu-latest
needs: build
steps:
- name: create payload var
run: |
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
- name: debug
run: |
echo "${{ vars.PAYLOAD }}"
echo "${{ vars.WEBHOOK_URL }}"
- name: curl webhook
run: |
curl --connect-timeout 30 --max-time 60 -s -S -X POST --data-urlencode "${{ vars.PAYLOAD }}" "${{ vars.WEBHOOK_URL }}"