diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c5bc16c..4d4da889 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,5 +44,5 @@ jobs: - name: Docker Login run: echo "$DOCKERHUB_TOKEN" | docker login --username "$DOCKERHUB_USERNAME" --password-stdin - name: Run build - run: earthly -P --ci --push --build-arg MIX_ENV=prod --build-arg GITHUB_REPO=${{ github.repository }} +docker + run: earthly -P --ci --push --build-arg GITHUB_REPO=${{ github.repository }} +docker diff --git a/Earthfile b/Earthfile index 2f5b7d52..2d28c529 100644 --- a/Earthfile +++ b/Earthfile @@ -19,7 +19,7 @@ deps: SAVE ARTIFACT /src/deps AS LOCAL deps ci: - FROM +deps + FROM +deps --MIX_ENV=dev COPY .credo.exs . COPY .formatter.exs . RUN mix clean @@ -28,7 +28,7 @@ ci: RUN mix credo --strict test: - FROM +deps + FROM +deps --MIX_ENV=test RUN apk add postgresql-client COPY --dir config ./ RUN MIX_ENV=test mix deps.compile @@ -48,7 +48,7 @@ docker-prod: SAVE IMAGE --push ghcr.io/$GITHUB_REPO:prod docker-dev: - FROM +deps + FROM +deps --MIX_ENV=dev RUN apk update --no-cache RUN apk add --no-cache inotify-tools nodejs npm ENV MIX_ENV=dev diff --git a/assets/css/app.scss b/assets/css/app.scss index 8495c68a..1cf71721 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -177,6 +177,7 @@ footer { @import "./agenda.scss"; @import "./contact.scss"; @import "./article.scss"; +@import "./boletins.scss"; // Com autenticação @import "./pages/app/researcher/profile.scss"; diff --git a/assets/css/boletins.scss b/assets/css/boletins.scss new file mode 100644 index 00000000..a8ce45d8 --- /dev/null +++ b/assets/css/boletins.scss @@ -0,0 +1,5 @@ +.boletim-wrapper { + .links-item { + width: 15.5rem; + } +} diff --git a/lib/pescarte_web/controllers/boletins_controller.ex b/lib/pescarte_web/controllers/boletins_controller.ex new file mode 100644 index 00000000..14c48f2f --- /dev/null +++ b/lib/pescarte_web/controllers/boletins_controller.ex @@ -0,0 +1,8 @@ +defmodule PescarteWeb.BoletinsController do + use PescarteWeb, :controller + + def show(conn, _params) do + current_path = conn.request_path + render(conn, :show, current_path: current_path, error_message: nil) + end +end diff --git a/lib/pescarte_web/controllers/boletin_controller.ex b/lib/pescarte_web/controllers/livros_controller.ex similarity index 80% rename from lib/pescarte_web/controllers/boletin_controller.ex rename to lib/pescarte_web/controllers/livros_controller.ex index ae9e3138..c12daf23 100644 --- a/lib/pescarte_web/controllers/boletin_controller.ex +++ b/lib/pescarte_web/controllers/livros_controller.ex @@ -1,4 +1,4 @@ -defmodule PescarteWeb.BoletinController do +defmodule PescarteWeb.LivrosController do use PescarteWeb, :controller def show(conn, _params) do diff --git a/lib/pescarte_web/router.ex b/lib/pescarte_web/router.ex index 8667f7d4..e926d28b 100644 --- a/lib/pescarte_web/router.ex +++ b/lib/pescarte_web/router.ex @@ -57,8 +57,9 @@ defmodule PescarteWeb.Router do end scope "/publicacoes" do - get "/boletin", BoletinController, :show get "/artigos", ArticleController, :show + get "/livros", LivrosController, :show + get "/boletins", BoletinsController, :show end scope "/contato" do diff --git a/lib/pescarte_web/templates/boletin_html.ex b/lib/pescarte_web/templates/boletin_html.ex deleted file mode 100644 index 09badf5c..00000000 --- a/lib/pescarte_web/templates/boletin_html.ex +++ /dev/null @@ -1,5 +0,0 @@ -defmodule PescarteWeb.BoletinHTML do - use PescarteWeb, :html - - embed_templates("boletin_html/*") -end diff --git a/lib/pescarte_web/templates/boletins_html.ex b/lib/pescarte_web/templates/boletins_html.ex new file mode 100644 index 00000000..25c1d736 --- /dev/null +++ b/lib/pescarte_web/templates/boletins_html.ex @@ -0,0 +1,5 @@ +defmodule PescarteWeb.BoletinsHTML do + use PescarteWeb, :html + + embed_templates("boletins_html/*") +end diff --git a/lib/pescarte_web/templates/boletin_html/show.html.heex b/lib/pescarte_web/templates/boletins_html/show.html.heex similarity index 94% rename from lib/pescarte_web/templates/boletin_html/show.html.heex rename to lib/pescarte_web/templates/boletins_html/show.html.heex index d6ad53ff..a54e4848 100644 --- a/lib/pescarte_web/templates/boletin_html/show.html.heex +++ b/lib/pescarte_web/templates/boletins_html/show.html.heex @@ -1,4 +1,4 @@ -
+