feat: add uploading to ci
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 1m46s
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 1m46s
This commit is contained in:
parent
2e726a65f8
commit
d45a950385
23
.github/workflows/deploy.yaml
vendored
23
.github/workflows/deploy.yaml
vendored
@ -18,8 +18,21 @@ jobs:
|
|||||||
- name: build
|
- name: build
|
||||||
run: pnpm run build
|
run: pnpm run build
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: 🔑 Configure rclone
|
||||||
uses: actions/upload-pages-artifact@v3
|
run: |
|
||||||
with:
|
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
|
||||||
# this should match the `pages` option in your adapter-static options
|
chmod 600 /tmp/id_rsa
|
||||||
path: 'app/build/'
|
mkdir -p ~/.config/rclone
|
||||||
|
echo -e "[sftp-remote]\ntype = sftp\nhost = ${SSH_HOST}\nuser = ${SSH_USER}\nport = ${SSH_PORT}\nkey_file = /tmp/id_rsa" > ~/.config/rclone/rclone.conf
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
SSH_HOST: ${{ vars.SSH_HOST }}
|
||||||
|
SSH_PORT: ${{ vars.SSH_PORT }}
|
||||||
|
SSH_USER: ${{ vars.SSH_USER }}
|
||||||
|
|
||||||
|
- name: 🚀 Deploy Changed Files via rclone
|
||||||
|
run: |
|
||||||
|
echo "Uploading the rest"
|
||||||
|
rclone sync --update -v --progress --exclude _astro/** --stats 2s --stats-one-line ./app/build/ sftp-remote:${REMOTE_DIR} --transfers 4
|
||||||
|
env:
|
||||||
|
REMOTE_DIR: ${{ vars.REMOTE_DIR }}
|
||||||
|
Loading…
Reference in New Issue
Block a user