Skip to content

Commit a0724b1

Browse files
authored
Merge pull request #28 from lnxpy/feature/package
PyAction package created
2 parents 748a683 + b276124 commit a0724b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+955
-812
lines changed

.bumpversion.cfg

-5
This file was deleted.

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: docs ci
1+
name: Docs Building
22

33
on:
44
push:

.github/workflows/release.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Package Releasing
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v3
16+
with:
17+
python-version: "3.12"
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install build
22+
- name: Build package
23+
run: python -m build
24+
- name: Publish new distributions to PyPI
25+
uses: pypa/gh-action-pypi-publish@release/v1
26+
with:
27+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/main.yml .github/workflows/testing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: main
1+
name: Package Testing
22

33
on:
44
push:

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ celerybeat.pid
120120
*.sage.py
121121

122122
# Environments
123-
# .env
123+
.env
124124
.venv
125125
env/
126126
venv/

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
exclude: "{{cookiecutter.action_slug}}"
1+
exclude: "pyaction/template"
22

33
repos:
44
- repo: "https://github.com/pre-commit/pre-commit-hooks"
55
rev: v4.4.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
9+
exclude: ".bumpversion.cfg"
910
- id: check-added-large-files
1011
- repo: https://github.com/astral-sh/ruff-pre-commit
1112
rev: v0.3.0

README.md

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
## PyAction [![docs ci](https://github.com/lnxpy/pyaction/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/lnxpy/pyaction/actions/workflows/docs.yml) [![main](https://github.com/lnxpy/pyaction/actions/workflows/main.yml/badge.svg)](https://github.com/lnxpy/pyaction/actions/workflows/main.yml) ![version)](https://img.shields.io/github/v/tag/lnxpy/pyaction?label=Version)
22

3+
PyAction helps you to develop [GitHub Actions](https://docs.github.com/en/actions) using Python. It's delivered as an installable package with the ability to test the action locally before any deployment.
34

5+
Check out the [official docs](https://pyaction.imsadra.me) for more detailed information. There is also a [Quickstart](https://pyaction.imsadra.me/quickstart) demo tutorial that walks you through a simple hello-world action.
46

5-
PyAction is a [Cookiecutter](https://cookiecutter.io) template that allows you to develop custom [GitHub Actions](https://docs.github.com/en/actions) using [Python3](https://python.org/).
6-
7-
<!-- > [!NOTE]
8-
> Read ["Writing GitHub Actions in Python"](https://imsadra.me/writing-github-actions-in-python) article that walks you through a hello-world example. -->
7+
### Requirements
8+
- Python >= 3.8
9+
- pip
910

1011
### Installation
11-
Make sure you have Python and `pip` installed on your machine and install the `cookiecutter` package. That's the template generator tool.
12+
Run the following command in a fresh CLI tab.
1213

1314
```sh
14-
pip install -U cookiecutter
15+
pip install -U pyaction
1516
```
1617

17-
### Usage
18-
In order to create the template, run the following command.
18+
To make sure the installation process was successful, run the following command.
1919

2020
```sh
21-
cookiecutter gh:lnxpy/pyaction
21+
pyaction --version
2222
```
2323

24-
Answer the prompts and your template will be generated.
24+
### Usage
25+
It's recommended to initialize a template, then going along the development process. Thus, run the `init` command.
26+
27+
```sh
28+
pyaction init
29+
```
2530

26-
### Docs
27-
Check out the [official docs](https://pyaction.imsadra.me) for more information about PyAction and a demo hello-world action demonstration.
31+
Answer the prompts and your template will be generated. Check out the docs for the further steps.
2832

2933
### Contribution
30-
All your contributions and assistance are welcome. For more information about how you can contribute to the project, please follow the instructions [here](https://pyaction.imsadra.me/contributing). :beers:
34+
All your contributions and assistance are welcome. For more information about how you can contribute to the project, please follow the instructions [here](https://pyaction.imsadra.me/contributing). :sparkles:
3135

3236
### License
33-
PyAction is licensed under the terms of [MIT License](LICENSE).
37+
PyAction is licensed under the [MIT License](LICENSE) terms.

cookiecutter.json

-15
This file was deleted.

docs/contact.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ hide:
55
- navigation
66
---
77

8-
![Avatar](img/avatar.png){ align=right .avatar }
9-
10-
I'm Sadra, the creator of PyAction. If you have any questions, need any help, or have a change request, feel free to reach out to me on the following platforms. I'll try my best to respond back as soon as I can. :beers:
8+
I'm Sadra, the creator of PyAction. If you have any questions, need any help, or have a change request, feel free to reach out to me on the following platforms. I'll try my best to respond as soon as I can. :beers:
119

1210
<div class="grid cards" markdown>
1311

@@ -18,4 +16,4 @@ I'm Sadra, the creator of PyAction. If you have any questions, need any help, or
1816

1917
</div>
2018

21-
You can also subscribe to [my newsletter](https://blog.imsadra.me) and enjoy my technical articles. As a Python developer, I mainly write about science, tech, and software.
19+
You can also subscribe to [my newsletter](https://blog.imsadra.me) and enjoy my technical articles. As a Python developer, I mainly write about science, tech, and software. :writing_hand:

docs/contributing.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ hide:
55
- navigation
66
---
77

8-
Thanks for heading over to this index. I assume you're looking for a way to contributing to this project and as always, all your helps are welcome. Follow the instructions and enjoy contributing!
8+
Thanks for heading over to this page. I assume you're looking for a way to contribute to this project and as always, all your helps are welcome. Follow the instructions and enjoy contributing!
99

10-
!!! Note "Open an issue first please.."
10+
!!! Info "Open an issue first please.."
1111
I highly recommend you [open an issue](https://github.com/lnxpy/pyaction/issues/new/choose) first. Once we agree on the on-going conversation, then feel free to start working. :beers:
1212

1313
### Fork & Install
@@ -19,14 +19,14 @@ pip install pre-commit tox && pre-commit install
1919

2020
Once you're all set and need to test your changes in the supported environments, simply run `tox` and it'll grab your changes and puts them into test.
2121

22-
If you've changed the docs and want to see the results, run the following command and it'll serve your docs on [http://localhost:8000](http://localhost:8000).
22+
If you've changed the docs and want to see the results, run the following command and it'll serve the docs on [localhost:8000](http://localhost:8000).
2323

2424
```bash
25-
tox -e docs -- serve
25+
tox -e docs
2626
```
2727

2828
??? Note "Access the `venv` that `tox` has created.."
29-
If you need to access an environment with all the dev dependencies installed, run the following command and it'll create a virtualenv with all the requiremenets installed in it.
29+
If you need to access an environment with all the dev dependencies installed, run the following command and it'll create a virtualenv with all the requirements installed in it.
3030

3131
```bash
3232
tox --devenv venv

docs/css/navbar.css

+43-4
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,64 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Manrope:[email protected]&display=swap');
2+
13
.md-header {
2-
background-color: black;
4+
background-color: #0E1016;
35
box-shadow: none;
46
}
57

68
.md-tabs{
7-
background-color: black;
9+
background-color: #0E1016;
810
}
911

1012
.md-footer{
1113
background-color: #14161b;
1214
}
1315

1416
.md-footer-meta{
15-
background-color: black;
17+
background-color: #0E1016;
1618
}
1719

1820
.md-banner{
19-
background-color: #F95428;
21+
background: rgb(30,24,91);
22+
background: linear-gradient(90deg, rgba(30,24,91,1) 0%, rgba(44,59,150,1) 15%, rgba(144,2,255,1) 100%);
2023
}
2124

2225
.md-banner a{
2326
color: white !important;
2427
text-decoration: underline;
2528
}
29+
30+
.rounded {
31+
border-radius: 10px;
32+
}
33+
34+
.md-main blockquote {
35+
border-left: unset !important;
36+
padding: 20px 0 20px 0;
37+
}
38+
.md-main blockquote:before {
39+
opacity: 0.15;
40+
z-index: -1;
41+
content: open-quote;
42+
font-family: manrope;
43+
font-size: 11em;
44+
line-height: 0.5em;
45+
margin-left: -30px;
46+
position: absolute;
47+
}
48+
.md-main blockquote p {
49+
display: inline;
50+
}
51+
52+
.md-main blockquote mark {
53+
display: block;
54+
background-color: unset;
55+
margin-top: 13px;
56+
font-style: italic;
57+
color: #b45dfa;
58+
}
59+
60+
.md-main blockquote mark::before {
61+
color: #757575;
62+
content: "—";
63+
margin-right: 5px;
64+
}

0 commit comments

Comments
 (0)