Skip to content

Transfer

Transfer #18

Workflow file for this run

name: Transfer
on:
push:
branches:
- master
schedule:
- cron: '26 12 * * *'
watch:
types:
- started
fork:
workflow_dispatch:
jobs:
run-transfer-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Create .env file
run: |
echo "ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }}" >> .env
echo "REPO_OWNER=${{ secrets.REPO_OWNER }}" >> .env
echo "REPO_NAME=${{ secrets.REPO_NAME }}" >> .env
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Setup SSH
run: |
mkdir ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.CLOUD }} >> ~/.ssh/known_hosts
- name: Run transfer script
run: |
chmod +x transfer.sh
CLOUD=${{ secrets.CLOUD }} bash transfer.sh