Skip to content

Commit

Permalink
clean up website dir with ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjam committed Jan 2, 2024
1 parent 298f885 commit 0ca39c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/deploy-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ jobs:
- name: Build nemanjamiticcom
run: yarn build:nmc

- name: Clean up websites dir
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
key: ${{ secrets.VPS_KEY_ED25519 }}
port: ${{ secrets.VPS_PORT }}
script_stop: true
script: |
rm -rf /home/ubuntu/traefik-proxy/apps/nginx-with-volume-nmc/website/*
- name: Copy dist folder to remote host
uses: appleboy/scp-action@master
with:
Expand All @@ -51,8 +62,9 @@ jobs:
port: ${{ secrets.REMOTE_PORT }}
source: 'apps/nemanjamiticcom/dist/'
target: '/home/ubuntu/traefik-proxy/apps/nginx-with-volume-nmc/website'

# remove apps/nemanjamiticcom/dist path segments
strip_components: 3
# remove website dir
rm: true
# not good, must restart nginx docker every time
# rm: true
2 changes: 1 addition & 1 deletion apps/nemanjamiticcom/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const metadata = {
>
<Fragment slot="title">
Free template for <span class="hidden xl:inline">creating websites with</span>
<span class="text-accent dark:text-white highlight"> Astro 4.0.3</span> + Tailwind CSS
<span class="text-accent dark:text-white highlight"> Astro 4.0.4</span> + Tailwind CSS
</Fragment>

<Fragment slot="subtitle">
Expand Down

0 comments on commit 0ca39c5

Please sign in to comment.