Merge pull request #15 from djsir-data/dev #19
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: 'Push to Bitbucket' | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'main' | |
jobs: | |
setup: | |
name: 'Checkout Creative Content' | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.MRJ_TOKEN }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.MRJ_TOKEN }} | |
- name: Setup master branch bitbucket remote and push | |
run: | | |
git config user.email ${{ secrets.CREATIVE_BITBUCKET_EMAIL }}@bots.bitbucket.org | |
git config user.name "GH Bot" | |
git remote add publish https://x-token-auth:${{ secrets.CREATIVE_BITBUCKET_PAT }}@bitbucket.org/dedjtr_dev/creative-victoria-rstudio.git | |
git fetch --unshallow publish | |
git fetch --unshallow origin | |
git checkout master | |
git pull publish master --allow-unrelated-histories | |
git merge main --allow-unrelated-histories --strategy-option theirs | |
git push -u publish master --force-with-lease | |
git status | |