-
Notifications
You must be signed in to change notification settings - Fork 307
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
v1.3.0 #274
base: main
Are you sure you want to change the base?
v1.3.0 #274
Changes from all commits
3b8156f
08d92f2
b45cf2c
af870fd
a8ff120
0c6ad96
5d4899b
7d47dae
b27efcf
b33e0e4
697129c
1a795e3
d1a25f1
3a6446a
5058761
548dfeb
0152de7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# for debugging | ||
- uses: crazy-max/ghaction-dump-context@v2 | ||
- name: Debug dump | ||
uses: crazy-max/ghaction-dump-context@v2 | ||
|
||
- name: Checkout branch contents | ||
uses: actions/checkout@v4 | ||
|
@@ -42,14 +42,22 @@ jobs: | |
id: pages | ||
uses: actions/configure-pages@v4 | ||
|
||
# for debugging | ||
- if: runner.debug == '1' | ||
- uses: jwalton/gh-find-current-pr@master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Get PR number in hopefully more robust way (should never be undefined) and use below. |
||
if: github.event.action != 'closed' | ||
id: pr | ||
with: | ||
state: all | ||
|
||
- name: SSH debug | ||
if: runner.debug == '1' | ||
uses: mxschmitt/action-tmate@v3 | ||
|
||
- name: Build preview version of site | ||
if: github.event.action != 'closed' | ||
run: | | ||
JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}" | ||
JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ env.pr }}" | ||
env: | ||
pr: ${{ steps.pr.outputs.pr }} | ||
|
||
- name: Commit preview to Pages branch | ||
uses: rossjrw/pr-preview-action@v1.4.7 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# for debugging | ||
- uses: crazy-max/ghaction-dump-context@v2 | ||
- name: Debug dump | ||
uses: crazy-max/ghaction-dump-context@v2 | ||
|
||
- name: Create Pages branch | ||
uses: peterjgrainger/action-create-branch@v3.0.0 | ||
|
@@ -28,8 +28,8 @@ jobs: | |
with: | ||
ref: gh-pages | ||
|
||
# for debugging | ||
- if: runner.debug == '1' | ||
- name: SSH debug | ||
if: runner.debug == '1' | ||
uses: mxschmitt/action-tmate@v3 | ||
|
||
# clean slate, as if starting from orphan branch | ||
|
@@ -70,8 +70,8 @@ jobs: | |
run: | | ||
user="${{ github.repository_owner }}" | ||
description="An engaging 1-3 sentence description of your lab." | ||
printf "USER=${user}" >> $GITHUB_ENV | ||
printf "DESCRIPTION=${description}" >> $GITHUB_ENV | ||
printf "\nUSER=${user}" >> $GITHUB_ENV | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
printf "\nDESCRIPTION=${description}" >> $GITHUB_ENV | ||
|
||
- name: Personalize readme for user | ||
run: | | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,35 +28,40 @@ jobs: | |
timeout-minutes: 15 | ||
|
||
steps: | ||
# for debugging | ||
- uses: crazy-max/ghaction-dump-context@v2 | ||
- name: Debug dump | ||
uses: crazy-max/ghaction-dump-context@v2 | ||
|
||
- name: Checkout branch contents | ||
if: github.event.action != 'closed' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup Python | ||
if: github.event.action != 'closed' | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
cache: "pip" | ||
cache-dependency-path: "**/requirements.txt" | ||
|
||
- name: Install Python packages | ||
if: github.event.action != 'closed' | ||
run: | | ||
python -m pip install --upgrade --requirement ./_cite/requirements.txt | ||
|
||
# for debugging | ||
- if: runner.debug == '1' | ||
- name: SSH debug | ||
if: runner.debug == '1' | ||
uses: mxschmitt/action-tmate@v3 | ||
|
||
- name: Build updated citations | ||
if: github.event.action != 'closed' | ||
run: python _cite/cite.py | ||
timeout-minutes: 15 | ||
|
||
- name: Check if citations changed | ||
if: github.event.action != 'closed' | ||
id: changed | ||
uses: tj-actions/verify-changed-files@v18 | ||
with: | ||
|
@@ -65,6 +70,7 @@ jobs: | |
|
||
- name: Commit updated citations to branch | ||
if: | | ||
github.event.action != 'closed' && | ||
steps.changed.outputs.files_changed == 'true' && | ||
inputs.open-pr != true | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
|
@@ -73,12 +79,15 @@ jobs: | |
|
||
- name: Open pull request with updated citations | ||
if: | | ||
github.event.action != 'closed' && | ||
steps.changed.outputs.files_changed == 'true' && | ||
inputs.open-pr == true | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
branch: citation-update | ||
title: Periodic citation update | ||
body: | | ||
To see a live preview of this PR, close (not merge) and reopen it. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When opening a PR from |
||
|
||
outputs: | ||
changed: ${{ steps.changed.outputs.files_changed }} | ||
changed: ${{ steps.changed.outputs.files_changed || false }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ | |
class="button" | ||
href="{{ button.link | replace: "$LINK", button.link | relative_url }}" | ||
{% if button.tooltip %} | ||
data-tooltip="{{ button.tooltip }}" | ||
data-tooltip="{{ button.tooltip | xml_escape }}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add this in a bunch of places to prevent HTML parsing errors, e.g. |
||
{% endif %} | ||
data-style="{{ include.style }}" | ||
{% if include.flip %} | ||
data-flip | ||
{% endif %} | ||
aria-label="{{ button.tooltip | default: button.icon | default: "button" }}" | ||
aria-label="{{ button.tooltip | default: button.icon | default: "button" | xml_escape }}" | ||
> | ||
{% include icon.html icon=button.icon %} | ||
{% if button.text and button.text != "" %} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave this a name in several places, just to look a little nicer and more consistent.