deltachat/deltachat-pages

more CI issues: /var/www/html/staging gets deleted automatically every once in a while

missytake opened this issue · 4 comments

For example https://github.com/deltachat/deltachat-pages/actions/runs/5058473282/jobs/9078632290 failed because of this.

Workaround: It's fixed by running this on page:

sudo mkdir /var/www/html/staging
sudo chown jekyll:jekyll /var/www/html/staging/

But after a while (half an hour or so) it reappears. So I think it's some github action or cronjob deleting one directory too much.

...of course we could just add a cronjob to re-create this directory every 10 minutes 🤡

At least now the folder is there and was not removed even after rerunning the "deploy master branch" workflow on the last commit: https://github.com/deltachat/deltachat-pages/actions/runs/5059316869/jobs/9205658619

The only suspicious CI I found is this:

rsync --delete -vhr -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no" $GITHUB_WORKSPACE/${{ steps.getid.outputs.prid }}/ "${{ secrets.USERNAME }}@delta.chat:/var/www/html/staging/${{ steps.prepare.outputs.prid }}/"

Maybe somehow ${{ steps.prepare.outputs.prid }} is an empty string, would it result in deleting staging?

Maybe somehow ${{ steps.prepare.outputs.prid }} is an empty string, would it result in deleting staging?

Yes, this seems to be it; the replacement index.html isn't uploaded to staging/$prid/, but just to staging/. And then, staging gets deleted.

I have removed this buggy workflow: bc6e333