merge: pull request #45 from G-Epitech/update_raycasting #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CD: Deployement" | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
ignore_deployment_repository: | |
name: "βοΈ Ignore deployment repository" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "π Compare repository urls" | |
run: | | |
url="${{ secrets.DEPLOYMENT_URL }}" | |
url="${url%.git}" | |
repo=$(echo "$url" | awk -F ':' '{print $2}') | |
if [ "${{ github.repository }}" == "$repo" ]; then | |
echo "::set-output name=ignore::true" | |
else | |
echo "::set-output name=ignore::false" | |
fi | |
repository_mirroring: | |
name: "π Repository mirroring" | |
runs-on: ubuntu-latest | |
needs: ignore_deployment_repository | |
if: ${{ needs.ignore_deployment_repository.outputs.ignore != 'true' }} | |
steps: | |
- name: "π₯ Checkout repository" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "π Epitech mirroring" | |
uses: pixta-dev/repository-mirroring-action@v1 | |
with: | |
target_repo_url: ${{ secrets.DEPLOYMENT_URL }} | |
ssh_private_key: ${{ secrets.DEPLOYMENT_SSH_KEY }} |