diff --git a/.github/workflows/commmunity-theme-tutor.yml b/.github/workflows/commmunity-theme-tutor.yml deleted file mode 100644 index bafc490c9..000000000 --- a/.github/workflows/commmunity-theme-tutor.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Build and deploy tutor -on: - push: - branches: [ "community-theme.palm" ] - -jobs: - deploy: - permissions: - actions: write - runs-on: ubuntu-latest - - steps: - - name: Trigger community-theme-tutor pipeline - run: | - curl --request POST --form token=${{ secrets.GITLAB_PIPELINE_TOKEN }} --form ref=main https://gitlab.com/api/v4/projects/48712583/trigger/pipeline diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 000000000..79b4dd31b --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,23 @@ +name: Sync with private repo + +on: + push: + branches: [ community-theme.palm ] + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Sync to GitLab + run: | + mkdir -p ~/.ssh && chmod 700 ~/.ssh + eval $(ssh-agent -s) + echo "${{ secrets.GITLAB_KNOWN_HOSTS }}" > ~/.ssh/known_hosts && chmod 644 ~/.ssh/known_hosts + echo "${{ secrets.COMMUNITY_THEME_SSH_PRIVATE_KEY }}" | ssh-add - + git remote add gitlab $GITLAB_REPOSITORY + git push gitlab $GITHUB_REF + env: + GITLAB_REPOSITORY: git@gitlab.com:abstract-germany/community-theme/community-theme-header.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..0b4fde54f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +trigger_job: + trigger: + project: abstract-germany/community-theme/community-theme-tutor + branch: main + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: never + - if: '$CI_COMMIT_BRANCH == "community-theme.palm"' + when: always