devel #20

Merged
inhji merged 6 commits from devel into main 2023-03-27 12:22:30 +02:00
5 changed files with 19 additions and 4 deletions

6
.gitignore vendored
View file

@ -28,6 +28,12 @@ chiya-*.tar
# Ignore assets that are produced by build tools.
/priv/static/assets/
# Ignore processed assets
/priv/static
!/priv/static/robots.txt
!/priv/static/site.webmanifest
!/priv/static/browserconfig.xml
# Ignore digested assets cache.
/priv/static/cache_manifest.json

6
Makefile Normal file
View file

@ -0,0 +1,6 @@
SHELL := /bin/bash
all: build
build:
source ~/.asdf/asdf.sh && bash scripts/build.sh

View file

@ -9,7 +9,9 @@ defmodule Chiya.Channels do
alias Chiya.Notes.Note
@preloads [:notes]
@public_preloads [notes: (from n in Note, where: not is_nil(n.published_at))]
@public_preloads [notes: (from n in Note,
where: not is_nil(n.published_at),
order_by: [desc: n.published_at])]
@doc """
Returns the list of channels.

View file

@ -13,9 +13,12 @@
<link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} />
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}>
</script>
<style><%= @settings.custom_css %></style>
</head>
<body class="bg-theme-background antialiased">
<.admin_bar current_user={@current_user} />
<%= @inner_content %>
<%= @settings.custom_html %>
</body>
</html>

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
echo "Pulling latest changes.."
git pull
git pull origin main
echo "Updating mix dependencies.."
mix deps.get --only prod
@ -18,5 +18,3 @@ MIX_ENV=prod mix assets.deploy
echo "Generating release.."
MIX_ENV=prod mix release --overwrite
echo "Restarting application.."
systemctl --user restart chiya