Try porting CI to FTP (should already upload files to the beta site)
All checks were successful
/ Build and deploy website (push) Successful in 4m12s
All checks were successful
/ Build and deploy website (push) Successful in 4m12s
This commit is contained in:
parent
200b049f60
commit
c492dd785f
1 changed files with 3 additions and 8 deletions
|
@ -5,19 +5,18 @@ on:
|
|||
|
||||
env:
|
||||
SERVER_URL: ${{ vars.SERVER_URL }}
|
||||
FTP_USER: ${{ vars.FTP_USER }}
|
||||
|
||||
jobs:
|
||||
build-website:
|
||||
name: Build and deploy website
|
||||
runs-on: alpine
|
||||
container:
|
||||
image: alpine:edge
|
||||
defaults:
|
||||
run:
|
||||
shell: ash -eo pipefail {0}
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: apk add --no-cache curl nodejs git zola openssh minify
|
||||
run: apk add --no-cache curl nodejs git zola openssh minify lftp
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
@ -26,9 +25,5 @@ jobs:
|
|||
- name: Minify files
|
||||
run: minify --all -r -o . public
|
||||
|
||||
- name: Output SSH key to file
|
||||
run: |
|
||||
echo "${{ secrets.SSH_KEY }}" > ssh_id
|
||||
chmod 0600 ssh_id
|
||||
- name: Transfer built files
|
||||
run: scp -i ssh_id -o StrictHostKeyChecking=accept-new -r ./public/. ${{ env.SERVER_URL }}
|
||||
run: lftp -e 'set ssl:verify-certificate false; mirror --reverse --delete --no-perms --overwrite ./public httpdocs; exit' ftp://${{ env.FTP_USER }}:${{ secrets.FTP_PASSWORD }}@${{ env.SERVER_URL }}/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue