mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-29 21:38:34 +01:00
21 lines
1 KiB
YAML
21 lines
1 KiB
YAML
on:
|
|
push:
|
|
branches: [main]
|
|
jobs:
|
|
deploy-server:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
# this is a beautiful way to deploy a website and i will not take any criticism
|
|
# (though maybe if you self-host this, you should use a better way to deploy your site)
|
|
- name: Deploy
|
|
run: |
|
|
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
|
|
mkdir ~/.ssh && echo "${{ secrets.ELLBOT_KEY }}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
|
rsync -rv --delete -e 'ssh -o "ProxyCommand cloudflared access ssh --hostname %h" -o "StrictHostKeyChecking=no"' server/public/ ellbot@ssh.ellpeck.de:/var/www/jsp/public
|
|
- name: Purge Cloudflare cache
|
|
uses: NathanVaughn/actions-cloudflare-purge@v3.1.0
|
|
with:
|
|
cf_zone: ${{ secrets.CLOUDFLARE_ZONE }}
|
|
cf_auth: ${{ secrets.CLOUDFLARE_TOKEN }}
|