diff --git a/.gitignore b/.gitignore index 68bc17f..ab96b1f 100644 --- a/.gitignore +++ b/.gitignore @@ -157,4 +157,4 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +.idea/* diff --git a/tests/test_template.py b/tests/test_template.py index 33ea7ac..5ed7110 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -63,7 +63,7 @@ def test_project(project): """ # Just a basic sanity test. - assert len(list(project.iterdir())) == 4 + assert len(list(project.iterdir())) == 6 return diff --git a/{{cookiecutter.project_slug}}/ExampleGitHubAction.yml b/{{cookiecutter.project_slug}}/ExampleGitHubAction.yml new file mode 100644 index 0000000..a4100d0 --- /dev/null +++ b/{{cookiecutter.project_slug}}/ExampleGitHubAction.yml @@ -0,0 +1,29 @@ +name: Build # Workflow name - this is what will appear in the "Actions" tab of the repo and the "checks" section of the PR +# To use this action you can copy this over to .github/workflows and GitHub will automatically recognize it and run when you push a change. +# This workflow assumes you are using pip to install requirements and that the requirements are in a requirements.txt file + +on: # Define the triggers that will cause the workflow to run + push: + workflow_dispatch: + repository_dispatch: + +jobs: + # Build job + build: + runs-on: ubuntu-latest # This is the VM type that will run it. + steps: # The actions that define the workflow + - uses: actions/checkout@v4 # Check out the repo + - name: Install Python + uses: actions/setup-python@v5 # Install Python + with: + python-version: "3.13" # Define the version of Python that is needed + - name: Install dependencies + run: | # Tasks to run. First update pip, then install all the requirements. + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build the site + run: render-engine build # Render your site. + - uses: actions/upload-artifact@v4 # Upload (and therefor preserve) the rendered site. + with: + name: website + path: ./output # If you are using the default output directory this is fine, otherwise change it to the directory you are using. diff --git a/{{cookiecutter.project_slug}}/ExampleGitHubActionUV.yml b/{{cookiecutter.project_slug}}/ExampleGitHubActionUV.yml new file mode 100644 index 0000000..743bf0e --- /dev/null +++ b/{{cookiecutter.project_slug}}/ExampleGitHubActionUV.yml @@ -0,0 +1,29 @@ +name: Build # Workflow name - this is what will appear in the "Actions" tab of the repo and the "checks" section of the PR +# To use this action you can copy this over to .github/workflows and GitHub will automatically recognize it and run when you push a change. +# This workflow is for the case where you are using uv. + +on: # Define the triggers that will cause the workflow to run + push: + workflow_dispatch: + repository_dispatch: + +jobs: + # Build job + build: + runs-on: ubuntu-latest # This is the VM type that will run it. + steps: # The actions that define the workflow + - uses: actions/checkout@v4 # Check out the repo + - name: Install Python + uses: actions/setup-python@v5 # Install Python + with: + python-version: "3.13" # Define the version of Python that is needed + - name: Install dependencies + run: | # Tasks to run. First update pip, then install uv. + python -m pip install --upgrade pip + pip install uv + - name: Build the site + run: uv run render-engine build # Render your site. Calling uv run will handle all the necessary requirements. + - uses: actions/upload-artifact@v4 # Upload (and therefor preserve) the rendered site. + with: + name: website + path: ./output # If you are using the default output directory this is fine, otherwise change it to the directory you are using.