Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing GHA #376

Merged
merged 7 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/render-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout
uses: actions/checkout@v2
with:
# get the full repo
fetch-depth: 0

# We want a fresh run of the renders each time
- name: Delete old docs/*
Expand Down Expand Up @@ -62,16 +59,16 @@ jobs:
- name: Commit rendered bookdown files to development branch
id: commit
run: |
git checkout -b "preview-${{ github.event.pull_request.number }}"
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
changes=$(git diff --name-only origin/main -- docs)
git add -A
git commit -m 'Render bookdown preview' || echo "No changes to commit"
git push --force origin "preview-${{ github.event.pull_request.number }}" || echo "No changes to push"
changes=$(git diff --name-only `git log --format="%H" -n 1 origin/main` -- docs)

if [[ -n $changes ]]; then
echo ::set-output name=changes::$(echo 'changes')
git checkout -b "preview-${{ github.event.pull_request.number }}"
git add -A
git commit -m 'Render bookdown preview'
git push --force origin "preview-${{ github.event.pull_request.number }}"
else
echo ::set-output name=changes::$(echo 'no_changes')
fi
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/style-and-sp-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
# What branch to commit to: the one from the pull request
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Run spell check
id: spell_check_run
Expand Down