This commit is contained in:
commit
c7377979ad
37 changed files with 5061 additions and 0 deletions
73
.forgejo/workflows/build.yaml
Normal file
73
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,73 @@
|
|||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: apt-get update && apt-get install -y rsync
|
||||
- name: Create private key
|
||||
run: |
|
||||
echo "${{ secrets.ACT_RUNNER_KEY }}" > /tmp/act_runner_key
|
||||
chmod 600 /tmp/act_runner_key
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- run: pip install "pelican[markdown]"
|
||||
- run: make publish
|
||||
- name: rsync public directory
|
||||
run: |
|
||||
/usr/bin/rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no" ${{ gitea.workspace }}/output/* root@vps03.hadan-it.com:/data/webspace/blog.hadan-it.com/
|
||||
|
||||
- name: ntfy-success-notifications
|
||||
uses: https://github.com/niniyas/ntfy-action@master
|
||||
if: success()
|
||||
with:
|
||||
title: 'Forgejo Actions'
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
priority: 4
|
||||
headers: '${{ secrets.NTFY_HEADERS }}'
|
||||
tags: +1,partying_face,action,successfully,completed
|
||||
details: Workflow has been successfully completed!
|
||||
icon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Forgejo_logo.svg/512px-Forgejo_logo.svg.png'
|
||||
image: true
|
||||
|
||||
- name: ntfy-failed-notifications
|
||||
uses: https://github.com/niniyas/ntfy-action@master
|
||||
if: failure()
|
||||
with:
|
||||
title: 'Forgejo Actions'
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
priority: 5
|
||||
headers: '${{ secrets.NTFY_HEADERS }}'
|
||||
tags: +1,partying_face,action,failed
|
||||
details: Workflow has failed!
|
||||
actions: 'default'
|
||||
icon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Forgejo_logo.svg/512px-Forgejo_logo.svg.png'
|
||||
image: true
|
||||
|
||||
- name: ntfy-cancelled-notifications
|
||||
uses: https://github.com/niniyas/ntfy-action@master
|
||||
if: cancelled()
|
||||
with:
|
||||
title: 'Forgejo Actions'
|
||||
url: '${{ secrets.NTFY_URL }}'
|
||||
topic: '${{ secrets.NTFY_TOPIC }}'
|
||||
priority: 3
|
||||
headers: '${{ secrets.NTFY_HEADERS }}'
|
||||
tags: +1,partying_face,action,cancelled
|
||||
details: Workflow has been cancelled!
|
||||
actions: '[{"action": "view", "label": "Open portal", "url": "https://blog.hadan-it.com/", "clear": true}]'
|
||||
icon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Forgejo_logo.svg/512px-Forgejo_logo.svg.png'
|
||||
image: true
|
||||
|
||||
- run: echo "This job's status is ${{ job.status }}."
|
Loading…
Add table
Add a link
Reference in a new issue