Skip to content
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
35 changes: 35 additions & 0 deletions .github/DISCUSSION_TEMPLATE/general.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
body:
- type: checkboxes
attributes:
label: Checks
options:
- label: I have searched **[the docs](https://greene-lab.gitbook.io/lab-website-template-docs)**, [existing issues](https://github.com/greenelab/lab-website-template/issues), and [existing discussions](https://github.com/greenelab/lab-website-template/discussions) for answers first.
required: true

- type: input
id: repo
attributes:
label: Link to your website repo
description: "In almost all cases, **we cannot help you if you don't provide this**."
placeholder: ex. https://github.com/greenelab/greenelab.com
validations:
required: true

- type: input
id: version
attributes:
label: Version of Lab Website Template you are using
description: See your `CITATION.cff` file.
placeholder: ex. 1.0.0
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: |
Describe your issue in as much detail as possible. For example: What happened? What did you expect to happen? How can we reproduce the problem? What browser are you seeing the problem in?
placeholder: Description
validations:
required: true
35 changes: 35 additions & 0 deletions .github/DISCUSSION_TEMPLATE/q-a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
body:
- type: checkboxes
attributes:
label: Checks
options:
- label: I have searched **[the docs](https://greene-lab.gitbook.io/lab-website-template-docs)**, [existing issues](https://github.com/greenelab/lab-website-template/issues), and [existing discussions](https://github.com/greenelab/lab-website-template/discussions) for answers first.
required: true

- type: input
id: repo
attributes:
label: Link to your website repo
description: "In almost all cases, **we cannot help you if you don't provide this**."
placeholder: ex. https://github.com/greenelab/greenelab.com
validations:
required: true

- type: input
id: version
attributes:
label: Version of Lab Website Template you are using
description: See your `CITATION.cff` file.
placeholder: ex. 1.0.0
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: |
Describe your issue in as much detail as possible. For example: What happened? What did you expect to happen? How can we reproduce the problem? What browser are you seeing the problem in?
placeholder: Description
validations:
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: 💬 Start a discussion
url: https://github.com/greenelab/lab-website-template/discussions
about: I need help, I have a question, or other discussion.
- name: 📚 Docs issue
url: https://github.com/greenelab/lab-website-template-docs/issues
about: I have a question or issue related to the template documentation.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/issue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 🐞 Create an issue
description: I think I've discovered a bug, I want to request a feature/change, or other issue.

body:
- type: checkboxes
attributes:
label: Checks
options:
- label: I have searched **[the docs](https://greene-lab.gitbook.io/lab-website-template-docs)**, [existing issues](https://github.com/greenelab/lab-website-template/issues), and [existing discussions](https://github.com/greenelab/lab-website-template/discussions) for answers first.
required: true

- type: input
id: repo
attributes:
label: Link to your website repo
description: "In almost all cases, **we cannot help you if you don't provide this**."
placeholder: ex. https://github.com/greenelab/greenelab.com
validations:
required: true

- type: input
id: version
attributes:
label: Version of Lab Website Template you are using
description: See your `CITATION.cff` file.
placeholder: ex. 1.0.0
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: |
Describe your issue in as much detail as possible. For example: What happened? What did you expect to happen? How can we reproduce the problem? What browser are you seeing the problem in?
placeholder: Description
validations:
required: true
4 changes: 4 additions & 0 deletions .github/user_pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This website is based on the Lab Website Template.
See its documentation for working with this site:

https://greene-lab.gitbook.io/lab-website-template-docs
35 changes: 26 additions & 9 deletions .github/workflows/build-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ jobs:

steps:
- name: Debug dump
if: runner.debug == '1'
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 }}
Expand All @@ -42,25 +44,40 @@ jobs:
id: pages
uses: actions/configure-pages@v4

- uses: jwalton/gh-find-current-pr@master
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-${{ env.pr }}"
env:
pr: ${{ steps.pr.outputs.pr }}
JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}"

- name: Commit preview to Pages branch
if: github.event.action != 'closed'
uses: rossjrw/[email protected]
with:
source-dir: _site
umbrella-dir: ${{ env.PREVIEWS_FOLDER }}

- name: Checkout Pages branch
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Clean up preview folders
uses: actions/github-script@v7
with:
script: |
const { rm } = require("fs").promises;
const { PREVIEWS_FOLDER } = process.env;
const { owner, repo } = context.repo;
const prs = (await github.rest.pulls.list({ owner, repo, state: "closed" })).data;
for (const { number } of prs)
await rm(`${PREVIEWS_FOLDER}/pr-${number}`, { recursive: true, force: true });

- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: gh-pages
commit_message: "Clean up previews"
1 change: 1 addition & 0 deletions .github/workflows/build-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:

steps:
- name: Debug dump
if: runner.debug == '1'
uses: crazy-max/ghaction-dump-context@v2

- name: Checkout branch contents
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/first-time-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:

steps:
- name: Debug dump
if: runner.debug == '1'
uses: crazy-max/ghaction-dump-context@v2

- name: Create Pages branch
Expand All @@ -34,7 +35,7 @@ jobs:

# clean slate, as if starting from orphan branch
- name: Clear Pages branch
run: rm -rf * .github .docker .gitignore
run: rm -rf ./* .github .docker .gitignore

# prevent GitHub from running Jekyll a second time after build
- name: Make .nojekyll file
Expand Down Expand Up @@ -70,8 +71,8 @@ jobs:
run: |
user="${{ github.repository_owner }}"
description="An engaging 1-3 sentence description of your lab."
printf "\nUSER=${user}" >> $GITHUB_ENV
printf "\nDESCRIPTION=${description}" >> $GITHUB_ENV
printf "\nUSER=%s" "$user" >> "$GITHUB_ENV"
printf "\nDESCRIPTION=%s" "$description" >> "$GITHUB_ENV"

- name: Personalize readme for user
run: |
Expand All @@ -80,12 +81,12 @@ jobs:
![on-pull-request](../../actions/workflows/on-pull-request.yaml/badge.svg)
![on-schedule](../../actions/workflows/on-schedule.yaml/badge.svg)

# ${{ env.USER }}'s Website
# %s's Website

Visit **[website url](#)** 🚀

_Built with [Lab Website Template](https://greene-lab.gitbook.io/lab-website-template-docs)_
" > README.md
" "${{ env.USER }}" > README.md

- name: Personalize Jekyll config for user
uses: actions/github-script@v7
Expand Down Expand Up @@ -119,4 +120,4 @@ jobs:
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Setup repo"
commit_message: "Set up repo"
3 changes: 2 additions & 1 deletion .github/workflows/update-citations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:

steps:
- name: Debug dump
if: runner.debug == '1'
uses: crazy-max/ghaction-dump-context@v2

- name: Checkout branch contents
Expand All @@ -38,7 +39,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}

- name: Setup Python
- name: Set up Python
if: github.event.action != 'closed'
uses: actions/setup-python@v5
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-url.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:

steps:
- name: Debug dump
if: runner.debug == '1'
uses: crazy-max/ghaction-dump-context@v2

- name: Get Pages url
Expand Down
Loading