Skip to content

Workflow file for this run

# This is a basic workflow to help you get started with Actions
# i've chosen to use mirror-action ci over gitlab-mirror-and-ci-action, because this ssh key does not expire, while the person token used in the other one does
# https://github.com/yesolutions/mirror-action
name: mirror-action
# CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- '**'
# 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"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: mirror-repository
uses: spyoungtech/mirror-action@master
# @v0.5.1
with:
REMOTE: git@gitlab.com:hadithmv/hadithmv.github.io.git
GIT_SSH_PRIVATE_KEY: ${{ secrets.GIT_SSH_PRIVATE_KEY }}
# secrets.GIT_SSH_KEY
GIT_SSH_NO_VERIFY_HOST: "true"
DEBUG: "true"
# can get this error if you change something on the mirror end itself:
# remote: GitLab: You are not allowed to force push code to a protected branch on this project.
# solution:
# turn off branch protection in gitlab settings
# some setup instructions from a different action that im not using:
# https://github.com/pixta-dev/repository-mirroring-action
# How to generate an SSH key pair. Recommended encryption would be at least 2048-bit RSA.
# Add the public key to your gitlab account
# Add the private key as a secret to your workflow. More information on creating and using secrets.