mirror of
https://github.com/fmhy/edit.git
synced 2026-01-18 01:41:52 +11:00
BREAKING CHANGE: chore(ci): don't autogenerate single-page anymore
Use feedback.tasky.workers.dev/single-page. The single-page in the repo will stay.
This commit is contained in:
parent
cef2fb1efd
commit
eac3f62eb9
2 changed files with 0 additions and 58 deletions
30
.github/single-page.py
vendored
30
.github/single-page.py
vendored
|
|
@ -1,30 +0,0 @@
|
||||||
import glob
|
|
||||||
import time
|
|
||||||
|
|
||||||
|
|
||||||
def output():
|
|
||||||
read = glob.glob("*.md")
|
|
||||||
content = ""
|
|
||||||
nsfw_content = ""
|
|
||||||
ignore_files = {"README.md", "feedback.md", "posts.md", "index.md"}
|
|
||||||
for file in read:
|
|
||||||
if file not in ignore_files:
|
|
||||||
with open(file, "r") as f:
|
|
||||||
if "NSFWPiracy.md" == file:
|
|
||||||
nsfw_content += f.read()
|
|
||||||
continue
|
|
||||||
content += f.read()
|
|
||||||
return content + nsfw_content
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
content = output()
|
|
||||||
with open("single-page", "w") as file:
|
|
||||||
file.write(content)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
s = time.perf_counter()
|
|
||||||
main()
|
|
||||||
elapsed = time.perf_counter() - s
|
|
||||||
print(f"{__file__} executed in {elapsed:0.2f} seconds.")
|
|
||||||
28
.github/workflows/single-page.yml
vendored
28
.github/workflows/single-page.yml
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
name: Update Single Page
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: main
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update:
|
|
||||||
name: Update Single Page
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Create local changes
|
|
||||||
run: python .github/single-page.py
|
|
||||||
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
||||||
with:
|
|
||||||
commit_message: '♻️ update single page'
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue