Skip to content

Commit 3b0e194

Browse files
committed
Update publish wiki file extension
1 parent 44f264d commit 3b0e194

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ create_mix_project:
1616
# Y - in response to Do you want to generate the Github Action workflows: Deploy to Heroku?
1717
# Y - in response to Do you want to generate the .github/.workflow/README file?
1818
# Y - in response to Do you want to publish a Github Wiki for this project? You'd need to manually create the first Github Wiki Page and set the GH_TOKEN and GH_EMAIL secret for this to properly function.
19-
# Y - in response to Do you want to generate the Github Action to deploy to AWS ECS?
19+
# Y - in response to Do you want to generate the Github Action workflows: Deploy to Heroku?
20+
# Y - in response to Do you want to generate the Github Action workflows: Deploy to AWS ECS?
2021
# Y - in response to Would you like to add the Oban addon?
2122
# Y - in response to Would you like to add the ExVCR addon?
2223
common_addon_prompts = Y\nY\nY\nY\nY\nY\nY\nY\nY\n
@@ -38,7 +39,7 @@ live_addon_prompts = Y\n
3839
# Y - in response to Do you want to generate the Github Action workflow: Test?
3940
# Y - in response to Do you want to generate the .github/.workflow/README file?
4041
# Y - in response to Do you want to publish a Github Wiki for this project? You'd need to manually create the first Github Wiki Page and set the GH_TOKEN and GH_EMAIL secret for this to properly function.
41-
# N - in response to Do you want to generate the Github Action to deploy to AWS ECS?
42+
# Y - in response to Do you want to generate the Github Action to deploy to AWS ECS?
4243
# Y - in response to Would you like to add the Mimic addon?
4344
mix_addon_prompts = Y\nY\nY\nY\nY\nY\nY\n
4445

lib/nimble_template/addons/github.ex

+10-8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ defmodule NimbleTemplate.Addons.Github do
9191
project
9292
end
9393

94+
@impl true
95+
def do_apply(%Project{} = project, opts) when opts.github_action_deploy_aws_ecs do
96+
Generator.copy_file([
97+
{:eex, ".github/workflows/deploy_to_aws_ecs.yml.eex",
98+
".github/workflows/deploy_to_aws_ecs.yml"}
99+
])
100+
101+
project
102+
end
103+
94104
defp copy_wiki_files(
95105
%Project{
96106
web_project?: web_project?,
@@ -139,14 +149,6 @@ defmodule NimbleTemplate.Addons.Github do
139149
Most of the documentation is located in the `.github/wiki` directory, which is published to the [project's Github wiki](https://github.com/[REPO]/wiki).
140150
"""
141151
)
142-
project
143-
end
144-
145-
def do_apply(%Project{} = project, opts) when opts.github_action_deploy_aws_ecs do
146-
Generator.copy_file([
147-
{:eex, ".github/workflows/deploy_to_aws_ecs.yml.eex",
148-
".github/workflows/deploy_to_aws_ecs.yml"}
149-
])
150152

151153
project
152154
end

lib/nimble_template/helpers/github.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ defmodule NimbleTemplate.GithubHelper do
2525
def generate_github_action_deploy_heroku?(),
2626
do: Mix.shell().yes?("\nDo you want to generate the Github Action workflows: Deploy to Heroku?")
2727

28-
def generate_github_action_deploy_aws?(),
28+
def generate_github_action_deploy_aws_ecs?(),
2929
do: Mix.shell().yes?("\nDo you want to generate the Github Action to deploy to AWS ECS?")
3030
end

lib/nimble_template/variants/phoenix/template.ex

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ defmodule NimbleTemplate.Phoenix.Template do
6767
if generate_github_wiki?(),
6868
do: Addons.Github.apply(project, %{github_wiki: true})
6969

70-
if generate_github_action_deploy_aws?(),
70+
if generate_github_action_deploy_heroku?(),
71+
do: Addons.Github.apply(project, %{github_action_deploy_heroku: true})
72+
73+
if generate_github_action_deploy_aws_ecs?(),
7174
do: Addons.Github.apply(project, %{github_action_deploy_aws_ecs: true})
7275

7376
project

0 commit comments

Comments
 (0)