Skip to content

Commit

Permalink
Update config to better handle deploying files to the production server
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljwarren committed Nov 7, 2024
1 parent 829c1c9 commit d8f92b4
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,23 @@ jobs:
uses: actions/download-artifact@v4
with:
name: website
path: website
- name: SSH and prepare staging folder
uses: appleboy/[email protected]
with:
host: ${{ secrets.PLESK_SSH_HOST }}
username: ${{ secrets.PLESK_SSH_USER }}
key: ${{ secrets.PLESK_SSH_KEY }}
script: |
mkdir staging
ln -s htacess staging/.htaccess
path: staging
- name: SCP files across
uses: appleboy/[email protected]
with:
host: ${{ secrets.PLESK_SSH_HOST }}
username: ${{ secrets.PLESK_SSH_USER }}
key: ${{ secrets.PLESK_SSH_KEY }}
source: website/**/*
target: staging
source: "staging/*,staging/**/*"
target: /var/www/vhosts/leicesterhackspace.org.uk
- name: SSH and make new version live
uses: appleboy/[email protected]
with:
host: ${{ secrets.PLESK_SSH_HOST }}
username: ${{ secrets.PLESK_SSH_USER }}
key: ${{ secrets.PLESK_SSH_KEY }}
script: |
ln -s htacess staging/.htaccess
mv production to-be-removed
mv staging production
rm -rf to-be-removed

0 comments on commit d8f92b4

Please sign in to comment.