Skip to content

Commit

Permalink
Update copy-to-blog.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittnieto authored Oct 4, 2024
1 parent cb8786c commit 1e0b9ca
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/copy-to-blog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,27 @@ jobs:
uses: actions/checkout@v4 # Actualizamos a la última versión

- name: Checkout Destination Repository
uses: actions/checkout@v4 # Actualizamos a la última versión
uses: actions/checkout@v4
with:
repository: schmittnieto/schmittnieto.github.io
path: blog_repo
token: ${{ secrets.GH_PAT }}
# Clonamos el repositorio del blog en un directorio separado
path: blog_destination

- name: Copy Files
run: |
rsync -av --exclude='.git' ./ blog_repo/assets/repo/AzSHCI --exclude=blog_repo
# Definir variables para las rutas
SOURCE_DIR="${{ github.workspace }}"
DEST_DIR="${{ github.workspace }}/blog_destination/assets/repo/AzSHCI"
# Crear el directorio de destino si no existe
mkdir -p "$DEST_DIR"
# Ejecutar rsync para copiar archivos del repositorio fuente al destino
rsync -av --exclude='.git' --exclude='blog_destination' "$SOURCE_DIR/" "$DEST_DIR/"
- name: Commit and Push Changes
working-directory: blog_repo
working-directory: blog_destination
run: |
git config user.name "schmittnieto"
git config user.email "[email protected]"
Expand Down

0 comments on commit 1e0b9ca

Please sign in to comment.