feat(ci): use rsync instead of lftp
Deploy to SFTP Server / build (push) Failing after 8m57s Details

This commit is contained in:
max_richter 2024-04-07 19:52:43 +02:00
parent c513605de6
commit 2df825187e
4 changed files with 34 additions and 34 deletions

View File

@ -55,19 +55,15 @@ jobs:
# Install dependencies, build, and generate site output
pnpm i && pnpm build
- name: 🚀 Deploy files via SFTP
continue-on-error: true
uses: pressidium/lftp-mirror-action@v1
with:
host: ${{ secrets.FTP_HOST }}
port: ${{ secrets.FTP_PORT || 21 }}
user: ${{ secrets.FTP_USERNAME }}
pass: ${{ secrets.FTP_PASSWORD }}
onlyNewer: true
restoreMTime: false
parallel: '3'
settings: 'sftp:auto-confirm=yes'
localDir: 'dist'
remoteDir: '/share/new-website'
options: '--verbose'
- name: 🔑 Set up SSH Key
run: |
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
chmod 600 /tmp/id_rsa
ssh-add /tmp/id_rsa
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: 🚀 Deploy Changed Files via rsync
run: |
rsync -avz --delete -e "ssh -p ${SSH_PORT}" ./dist/ ${SSH_USER}@${SSH_HOST}:${REMOTE_DIR}

3
.prettierrc Normal file
View File

@ -0,0 +1,3 @@
{
"bracketSameLine": true
}

View File

@ -5,6 +5,8 @@ RUN apk add --no-cache \
git \
git-lfs \
tar \
rsync \
openssh \
bash
# Install PNPM globally

View File

@ -70,23 +70,6 @@ import "./global.css";
} catch (e) {}
})();
</script>
</head>
<body class="bg-dark text-neutral p-2 flex flex-col gap-4">
<header class="sticky top-0 z-2 bg-dark">
<Nav />
</header>
<main id="main-content" class="flex flex-col gap-4">
<slot />
</main>
<footer class="px-4 flex gap-8 mb-4">
<LanguagePicker />
<a
href="https://git.max-richter.dev/max/website"
class="flex gap-2 items-center"
>
<span class="i-tabler-brand-git"></span>{t("website-source")}
</a>
</footer>
<style>
body {
max-width: 600px;
@ -96,8 +79,8 @@ import "./global.css";
.dark header::after {
content: "";
position: absolute;
width: 15px;
height: 15px;
width: 10px;
height: 10px;
color: red;
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 249 249' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M248.5 0H0V249C0.268799 111.435 111.423 0 248.5 0Z' fill='%2316161e'/%3E%3C/svg%3E");
}
@ -114,6 +97,22 @@ import "./global.css";
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 249 249' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M248.5 0H0V249C0.268799 111.435 111.423 0 248.5 0Z' fill='%2316161e'/%3E%3C/svg%3E");
}
</style>
</head>
<body class="bg-dark text-neutral p-2 flex flex-col gap-4">
<header class="sticky top-0 z-2 bg-dark">
<Nav />
</header>
<main id="main-content" class="flex flex-col gap-4">
<slot />
</main>
<footer class="px-4 flex gap-8 mb-4">
<LanguagePicker />
<a
href="https://git.max-richter.dev/max/website"
class="flex gap-2 items-center">
<span class="i-tabler-brand-git"></span>{t("website-source")}
</a>
</footer>
<script is:inline>
(function () {
// prettier-ignore