mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 15:56:20 +00:00
Merge branch 'distributed-press' into panel.sutty.nl
This commit is contained in:
commit
2e68eb7178
2 changed files with 21 additions and 0 deletions
|
@ -18,6 +18,7 @@ RUN apk add --no-cache libxslt libxml2 postgresql-libs libssh2 \
|
|||
|
||||
RUN gem install --no-document --no-user-install foreman
|
||||
RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -O - | tar --strip-components 1 -xvzf - pandoc-${PANDOC_VERSION}/bin/pandoc && mv /bin/pandoc /usr/bin/pandoc
|
||||
RUN apk add npm && npm install -g pnpm && apk del npm
|
||||
|
||||
COPY ./monit.conf /etc/monit.d/sutty.conf
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ class DeployLocal < Deploy
|
|||
def deploy(output: false)
|
||||
return false unless mkdir
|
||||
return false unless yarn(output: output)
|
||||
return false unless pnpm(output: output)
|
||||
return false unless bundle(output: output)
|
||||
|
||||
jekyll_build(output: output)
|
||||
|
@ -91,6 +92,10 @@ class DeployLocal < Deploy
|
|||
Rails.root.join('_yarn_cache').to_s
|
||||
end
|
||||
|
||||
def pnpm_cache_dir
|
||||
Rails.root.join('_pnpm_cache').to_s
|
||||
end
|
||||
|
||||
def yarn_lock
|
||||
File.join(site.path, 'yarn.lock')
|
||||
end
|
||||
|
@ -103,6 +108,21 @@ class DeployLocal < Deploy
|
|||
run %(gem install bundler --no-document), output: output
|
||||
end
|
||||
|
||||
def pnpm_lock
|
||||
File.join(site.path, 'pnpm-lock.yaml')
|
||||
end
|
||||
|
||||
def pnpm_lock?
|
||||
File.exist? pnpm_lock
|
||||
end
|
||||
|
||||
def pnpm(output: false)
|
||||
return true unless pnpm_lock?
|
||||
|
||||
run %(pnpm config set store-dir "#{pnpm_cache_dir}"), output: output
|
||||
run 'pnpm install --production', output: output
|
||||
end
|
||||
|
||||
# Corre yarn dentro del repositorio
|
||||
def yarn(output: false)
|
||||
return true unless yarn_lock?
|
||||
|
|
Loading…
Reference in a new issue