test a python action
Some checks failed
Gitea Actions Demo / compile-html (push) Failing after 1m14s

This commit is contained in:
vitrinekast 2025-01-07 11:51:20 +01:00
parent 7020fce49f
commit ddeab36416
4 changed files with 26 additions and 21 deletions

View File

@ -1,19 +1,28 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
on:
push:
branches: ["main"]
jobs:
Explore-Gitea-Actions:
compile-html:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.9.6"
- name: Install dependencies
run: |
ls ${{ gitea.workspace }}
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run the python application
run: python test.py
- run: echo "🍏 This job's status is ${{ job.status }}."

5
app.py
View File

@ -3,7 +3,6 @@ from pathlib import Path
import shutil
import csv
import re
import datetime
from jinja2 import Environment, PackageLoader, select_autoescape
import frontmatter
@ -161,8 +160,10 @@ def main():
[f"{Path(path).stem}.jinja", "post.jinja"])
page = get_page_data(path)
render_single_file(template, page, path, OUTPUT_D)
elif Path(path).suffix in [".csv"]:
print("not compiling this file!")
else:
print("i cannot handle this file yet")
print("i cannot handle this file yet: ", path)
copy_assets()

View File

@ -1,10 +1 @@
importlib_metadata==8.5.0
Jinja2==3.1.4
Markdown==3.7
markdown-include==0.8.1
MarkupSafe==3.0.2
python-frontmatter==1.1.0
python-slugify==8.0.4
PyYAML==5.1
text-unidecode==1.3
zipp==3.21.0
python-slugify==8.0.4

4
temp.py Normal file
View File

@ -0,0 +1,4 @@
from slugify import slugify
print('hello from python!')
print(slugify("i used to have spaces"))