Skip to content

Backup Image To PDF repo #790

Backup Image To PDF repo

Backup Image To PDF repo #790

# This is a basic workflow to help you get started with Actions
name: Backup Image To PDF repo
# Controls when the workflow will run
on:
schedule:
# Run every 4 hours
- cron: "0 */4 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
sync-image-to-pdf-repo:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
BACKUP_REPO: [email protected]:mobiledevpro/image-to-pdf-android.git
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Create a directory for Image-To-PDF-repo
run: |
mkdir image-to-pdf-repo
- name: Clone Image-To-PDF Repository
uses: actions/checkout@v4
with:
repository: 'yojimbo45/Image-to-PDF-Android'
path: image-to-pdf-repo
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
fetch-depth: 0 # fetch all history with branches and tags
- name: Check the directory
run: |
cd image-to-pdf-repo && ls
- name: Push all branches to backup repo
run: |
cd image-to-pdf-repo && ls &&
git push --mirror --verbose ${BACKUP_REPO}