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

no default shell in composite actions #44

Merged
merged 7 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 5 additions & 4 deletions .github/actions/buildbook/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ inputs:
jb-save:
description: "Save the Jupyterbook Build (boolean)"
required: true
token:
description: 'A GitHub Personal Access Token (for publishing)'
required: false

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup JupyterBook Cache
if: ${{inputs.jb-cache}} == true
uses: actions/cache@v2
Expand All @@ -29,14 +29,15 @@ runs:
- uses: ./.github/actions/setupconda

- name: Build JupyterBook
shell: bash -l {0}
run: |
./scripts/deploy_website.sh

- name: Publish to GitHub Pages
if: ${{inputs.publish-to-gh}} == true
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GH_PAT }}
personal_token: ${{inputs.token}}
publish_dir: book/_build/html
publish_branch: gh-pages

Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ on:
jobs:
build-and-test:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: ./.github/actions/buildbook
with:
jb-cache: true
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: ./.github/actions/buildbook
with:
jb-cache: true
publish-to-gh: true
jb-save: true
token: ${{ secrets.GH_PAT }}
5 changes: 1 addition & 4 deletions .github/workflows/manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ on:
jobs:
build-and-test:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: ./.github/actions/buildbook
with:
jb-cache: false
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/netlifypreview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ on:
jobs:
add-preview:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}
# This workflow accesses secrets and checks out a PR, so only run if labelled
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
if: contains(github.event.pull_request.labels.*.name, 'preview')

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: ./.github/actions/buildbook
with:
jb-cache: true
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ on:
jobs:
build-and-test:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}
# This workflow accesses secrets and checks out a PR, so only run if labelled
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
if: contains(github.event.pull_request.labels.*.name, 'preview')

steps:
- name: Checkout repository
uses: actions/checkout@v2

- uses: ./.github/actions/buildbook
with:
jb-cache: true
Expand Down