Merge pull request 'Публикация девлога через Actions' (#4) from hermes/devlog:ci/publish-workflow into main
publish / publish (push) Successful in 2s
publish / publish (push) Successful in 2s
Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Publishes the devlog on shanaty.ru when Emil merges an entry (a push to main of Emil_Shanaty/devlog).
|
||||
# Lives in the devlog repository as .gitea/workflows/publish.yml. It runs on the server's runner (label `python`), reads the merged entries
|
||||
# from Gitea and writes /data/devlog.json and /devlog/feed.xml of the site. The code is /opt/devlog/devlog_sync.py on the server, not from this
|
||||
# repository, so merging an entry never changes what runs.
|
||||
name: publish
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: python
|
||||
container:
|
||||
image: python:3.13-alpine
|
||||
volumes:
|
||||
- /opt/devlog:/opt/devlog:ro
|
||||
- /opt/gitea/site/data:/out/data
|
||||
- /opt/gitea/site/devlog:/out/devlog
|
||||
steps:
|
||||
- name: Publish the merged entries
|
||||
run: python3 /opt/devlog/devlog_sync.py
|
||||
env:
|
||||
DEVLOG_API: https://git.shanaty.ru/api/v1
|
||||
DEVLOG_OUT_JSON: /out/data/devlog.json
|
||||
DEVLOG_OUT_FEED: /out/devlog/feed.xml
|
||||
PYTHONDONTWRITEBYTECODE: "1"
|
||||
Reference in New Issue
Block a user