Skip to content

Commit

Permalink
Set to bash intentionally (#419)
Browse files Browse the repository at this point in the history
* set to bash

* Update

* no workflow dispatch
  • Loading branch information
cansavvy authored Jan 26, 2022
1 parent 65579db commit 623fed7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/render-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ jobs:
branch_name='preview-${{ github.event.pull_request.number }}'
exists=$(git ls-remote https://${{ secrets.GH_PAT }}@github.com/$GITHUB_REPOSITORY $branch_name | wc -l | xargs)
if [[ $exists -gt 0 ]];then
echo branch does exist
git checkout $branch_name
git merge -s recursive --strategy-option=theirs origin/${{ github.head_ref }}
else
if [[ $exists == 0 ]];then
echo branch doesnt exist
git checkout -b $branch_name
git push --set-upstream origin $branch_name
else
echo branch does exist
git checkout $branch_name
git merge -s recursive --strategy-option=theirs origin/${{ github.head_ref }}
fi
rm -r docs/*
shell: bash

# Run bookdown rendering
- name: Run bookdown render
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/style-and-sp-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ name: Style and spell check R markdowns
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
workflow_dispatch:
pull_request:
branches: [ main ]

Expand All @@ -30,15 +29,16 @@ jobs:
branch_name='preview-${{ github.event.pull_request.number }}'
exists=$(git ls-remote https://${{ secrets.GH_PAT }}@github.com/$GITHUB_REPOSITORY $branch_name | wc -l | xargs)
if [[ $exists -gt 0 ]];then
echo branch does exist
git checkout $branch_name
git merge -s recursive --strategy-option=theirs origin/${{ github.head_ref }}
else
if [[ $exists == 0 ]];then
echo branch doesnt exist
git checkout -b $branch_name
git push --set-upstream origin $branch_name
else
echo branch does exist
git checkout $branch_name
git merge -s recursive --strategy-option=theirs origin/${{ github.head_ref }}
fi
shell: bash

- name: Run spell check
id: spell_check_run
Expand Down

0 comments on commit 623fed7

Please sign in to comment.