-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update config to better handle deploying files to the production server
- Loading branch information
1 parent
829c1c9
commit d8f92b4
Showing
1 changed file
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |