From 92bcb86ad0fe897054545e22155c10a9190498c5 Mon Sep 17 00:00:00 2001 From: Vahid Al Date: Thu, 28 Dec 2023 22:31:39 +0330 Subject: [PATCH] Add final cleaning touches --- .github/workflows/static.yml | 14 +++++++------- README.md | 11 ++++++++++- github_actions_python/__init__.py | 0 pyproject.toml | 5 ++--- script.py | 2 +- 5 files changed, 20 insertions(+), 12 deletions(-) delete mode 100644 github_actions_python/__init__.py diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index fe6af8e..a69ba82 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,8 +1,7 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages +name: Deploy Jake Website to GitHub Pages on: - # Runs on pushes targeting the default branch + # Runs on pushes targeting the main branch push: branches: ["main"] @@ -22,7 +21,6 @@ concurrency: cancel-in-progress: false jobs: - # Single deploy job since we're just deploying deploy: environment: name: github-pages @@ -31,15 +29,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Install poetry + - name: Install Poetry run: pipx install poetry - uses: actions/setup-python@v5 with: python-version: "3.11" cache: "poetry" - - run: poetry install - - run: poetry run python script.py + - name: Install Dependencies + run: poetry install + - name: Run the Jake's Generator Script + run: poetry run python script.py - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifact diff --git a/README.md b/README.md index 49bb147..5fac43b 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,14 @@ Jake is a tool that allows you to effortlessly create your own one-link website ## Usage ### Create a Repository + To get started, follow these steps to create a new repository using this template: 1. Click [here](https://github.com/new?template_name=jake&template_owner=thevahidal) to create a new repository. 2. Choose a name for your repository. If you want your website to be deployed at `.github.io`, name your repository `.github.io`. Alternatively, you can choose any other name, such as `that-other-name`, which will result in your website being deployed at `.github.io/that-other-name/`. ### Enable GitHub Pages + After creating the repository, you need to enable GitHub Pages. Follow these steps: 1. Go to your repository's `Settings` tab. @@ -19,6 +21,7 @@ After creating the repository, you need to enable GitHub Pages. Follow these ste 4. Click `Save` to apply the changes. ### Add your data + To customize your website, follow these steps: 1. Open your repository in your preferred text editor. @@ -26,6 +29,7 @@ To customize your website, follow these steps: 3. Modify the following settings according to your preferences: **General Information:** + - `name`: Your name (e.g., "Vahid Al") - `description`: A brief bio about yourself (e.g., "Software Developer and passionate about creating things") - `keywords`: Keywords for the keywords meta tag (e.g., "python, javascript, go") @@ -37,11 +41,13 @@ To customize your website, follow these steps: You can add multiple sections based on your requirements. For example, you may want a section for your projects, another for your social media links, and another for your merchandise products. Each section is defined using `[[sections]]`. Each section has the following components: + - `title`: The title of the section (e.g., "Projects") - `description`: A brief description of the section (e.g., "Here are some of my projects") - `items`: The items associated with the section. Each item is defined using `[[sections.items]]`. Each item within a section has the following components: + - `title`: The title of the item (e.g., "Soul") - `description`: A brief description of the item (e.g., "An SQLite REST and Real-time server") - `url`: The URL associated with the item (e.g., "https://github.com/thevahidal/soul") @@ -49,19 +55,22 @@ Each item within a section has the following components: Make the necessary modifications to the `data.toml` file based on the above instructions to customize your website with your own information and sections. ### Voila! + That's all you need to do. Now, you can sit back and relax while your website gets deployed. You can monitor the progress in the `Actions` tab of your repository. Once the deployment is complete, you can access your brand new one-link website at `.github.io` or `.github.io/repo-name/`. > Note: You may need to manually trigger the GitHub Action to deploy your website. Here's how you can do it: > 1. In your repository, navigate to the "Actions" tab located in the right sidebar. -> 2. Look for the workflow named "Deploy static content to Pages" in the list of workflows. +> 2. Look for the workflow named "Deploy Jake Website to GitHub Pages" in the list of workflows. > 3. If you see an alert stating "This workflow has a workflow_dispatch event trigger," it means you can manually trigger the workflow. > 4. Click on the "Run Workflow" button. A new window will appear. > 5. Within the new window, click on the green "Run Workflow" button. > 6. GitHub Actions will initiate the deployment process for your static content to GitHub Pages. ## Contributing + If you find any issues or have suggestions for improvement, please feel free to contribute by submitting a pull request or creating an issue in the repository. ## License + This project is licensed under the [MIT License](LICENSE). diff --git a/github_actions_python/__init__.py b/github_actions_python/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pyproject.toml b/pyproject.toml index 6d95601..fd33df9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,9 @@ [tool.poetry] -name = "github-actions-python" +name = "jake" version = "0.1.0" -description = "" +description = "Effortlessly create and deploy your own one-link website on GitHub." authors = ["Vahid Al "] readme = "README.md" -packages = [{include = "github_actions_python"}] [tool.poetry.dependencies] python = "^3.11" diff --git a/script.py b/script.py index 1b1dbfd..1820c54 100644 --- a/script.py +++ b/script.py @@ -1,6 +1,6 @@ import tomllib -from tinyhtml import html, h, frag, raw +from tinyhtml import html, h, frag with open("data.toml", "rb") as f: