Skip to content

Debug cache warmup

Debug cache warmup #26

Workflow file for this run

on:
push:
branches:
- master
jobs:
build:
name: Build website .tar.gz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build .tar.gz file
run: |
docker build --tag local-img/zipper --target zipper .
docker create --name zipper local-img/zipper
docker cp zipper:/build.tar.gz ./build.tar.gz
docker rm -f zipper
shell: bash
- uses: actions/upload-artifact@v4
with:
name: build-tar-gz
path: ./build.tar.gz
deploy:
name: Deploy website to Strato
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: build-tar-gz
- name: Apt install sshpass
run: |
sudo apt-get update
sudo apt-get -y install sshpass
- name: Upload to Strato
env:
SSHPASS: ${{ secrets.STRATO_SSH_PASSWORD }}
run: |
sshpass -e scp -oStrictHostKeyChecking=no ./build.tar.gz ${{ secrets.STRATO_SSH_USERNAME }}@ssh.strato.com:build.tar.gz
sshpass -e ssh -oStrictHostKeyChecking=no ${{ secrets.STRATO_SSH_USERNAME }}@ssh.strato.com << EOF
rm -rf ./new-release
mkdir new-release
cd new-release
tar -xzvf ../build.tar.gz
cd ..
rm -f ./build.tar.gz
echo "IFTTT_KEY=${{ secrets.IFTTT_KEY }}" > ./new-release/.env
echo "MAIL_ORDERS_TO=${{ secrets.MAIL_ORDERS_TO }}" >> ./new-release/.env
rm -rf ./prev-release
mv ./app ./prev-release
mv ./new-release ./app
rm -rf ./new-release
EOF