Skip to content

Commit ac2aaeb

Browse files
committed
init commit
0 parents  commit ac2aaeb

File tree

285 files changed

+6425
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+6425
-0
lines changed

.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
BUNDLE_BUILD__POSIX___SPAWN: "--with-cflags=-Wno-incompatible-function-pointer-types"

.github/workflows/build-site.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: build-site
2+
run-name: build live site
3+
4+
on:
5+
# run when called from another workflow
6+
workflow_call:
7+
8+
# run if user manually requests it
9+
workflow_dispatch:
10+
11+
# push to dev branch
12+
push:
13+
branches:
14+
- dev
15+
16+
# variables
17+
env:
18+
PREVIEWS_FOLDER: preview
19+
20+
permissions:
21+
contents: write
22+
23+
jobs:
24+
build-site:
25+
runs-on: ubuntu-22.04
26+
27+
steps:
28+
# for debugging
29+
- uses: crazy-max/ghaction-dump-context@v2
30+
31+
- name: Checkout branch contents
32+
uses: actions/checkout@v4
33+
34+
- name: Install Ruby packages
35+
uses: ruby/[email protected]
36+
with:
37+
ruby-version: "3.3"
38+
bundler-cache: true
39+
40+
- name: Get Pages url
41+
id: pages
42+
uses: actions/configure-pages@v4
43+
44+
# for debugging
45+
- if: runner.debug == '1'
46+
uses: mxschmitt/action-tmate@v3
47+
48+
- name: Set root url
49+
run: |
50+
printf "\n\nurl: ${{ steps.pages.outputs.origin }}" >> _config.yaml
51+
52+
- name: Build live version of site
53+
run: |
54+
JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}"
55+
56+
- name: Commit live site to Pages branch
57+
uses: JamesIves/[email protected]
58+
with:
59+
folder: _site
60+
clean-exclude: ${{ env.PREVIEWS_FOLDER }}
61+
force: false
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: first-time-setup
2+
run-name: first time setup of repo
3+
4+
on:
5+
# run if user manually requests it
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
first-time-setup:
13+
runs-on: ubuntu-22.04
14+
15+
steps:
16+
- name: Debug dump
17+
uses: crazy-max/ghaction-dump-context@v2
18+
19+
- name: Create Pages branch
20+
uses: peterjgrainger/[email protected]
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
with:
24+
branch: "gh-pages"
25+
26+
- name: Checkout Pages branch
27+
uses: actions/checkout@v4
28+
with:
29+
ref: gh-pages
30+
31+
- name: SSH debug
32+
if: runner.debug == '1'
33+
uses: mxschmitt/action-tmate@v3
34+
35+
# clean slate, as if starting from orphan branch
36+
- name: Clear Pages branch
37+
run: rm -rf * .github .docker .gitignore
38+
39+
# prevent GitHub from running Jekyll a second time after build
40+
- name: Make .nojekyll file
41+
run: touch .nojekyll
42+
43+
- name: Make placeholder homepage
44+
run: printf "Placeholder homepage" > index.html
45+
46+
- name: Commit changes to Pages branch
47+
uses: stefanzweifel/git-auto-commit-action@v5
48+
with:
49+
branch: gh-pages
50+
commit_message: "Clear branch"
51+
52+
- name: Checkout main branch
53+
uses: actions/checkout@v4
54+
55+
- name: Remove files user doesn't need
56+
run: |
57+
rm -rf \
58+
CHANGELOG.md \
59+
testbed.md \
60+
.github/ISSUE_TEMPLATE \
61+
.github/DISCUSSION_TEMPLATE \
62+
.github/workflows/versioning.yaml \
63+
.github/pull_request_template.md \
64+
65+
- name: Commit changed files
66+
uses: stefanzweifel/git-auto-commit-action@v5
67+
with:
68+
commit_message: "Setup repo"

.github/workflows/on-pages.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: on-pages
2+
run-name: on pages deploy
3+
4+
on:
5+
workflow_run:
6+
workflows: [pages-build-deployment]
7+
types:
8+
- completed
9+
branches:
10+
- gh-pages
11+
12+
# run if user manually requests it
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
update-url:
20+
# only run on user instance of template, not template itself
21+
if: github.repository != 'greenelab/lab-website-template'
22+
uses: ./.github/workflows/update-url.yaml
23+
24+
build-site:
25+
needs: update-url
26+
if: needs.update-url.outputs.changed == 'true'
27+
uses: ./.github/workflows/build-site.yaml

.github/workflows/update-url.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: update-url
2+
run-name: update site after url change
3+
4+
on:
5+
# run when called from another workflow
6+
workflow_call:
7+
outputs:
8+
changed:
9+
value: ${{ jobs.update-url.outputs.changed }}
10+
11+
# run if user manually requests it
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: write
16+
17+
jobs:
18+
update-url:
19+
runs-on: ubuntu-22.04
20+
21+
steps:
22+
# for debugging
23+
- uses: crazy-max/ghaction-dump-context@v2
24+
25+
- name: Get Pages url
26+
id: pages
27+
uses: actions/configure-pages@v4
28+
29+
- name: Checkout branch contents
30+
uses: actions/checkout@v4
31+
32+
# for debugging
33+
- if: runner.debug == '1'
34+
uses: mxschmitt/action-tmate@v3
35+
36+
# update link to site in readme
37+
- name: Update readme
38+
uses: actions/github-script@v7
39+
with:
40+
script: |
41+
const { readFileSync, writeFileSync } = require("fs");
42+
const file = "README.md";
43+
let contents = readFileSync(file).toString();
44+
const find = /\*\*\[.*\]\(.*\)\*\*/;
45+
const host = "${{ steps.pages.outputs.host }}";
46+
const path = "${{ steps.pages.outputs.base_path }}";
47+
const url = "${{ steps.pages.outputs.base_url }}";
48+
const replace = `**[${host}${path}](${url})**`;
49+
if (contents.match(find))
50+
contents = contents.replace(find, replace);
51+
else
52+
contents = `Visit ${replace} 🚀\n\n` + contents;
53+
writeFileSync(file, contents);
54+
55+
- name: Check if readme changed
56+
id: changed
57+
uses: tj-actions/verify-changed-files@v18
58+
with:
59+
files: |
60+
README.md
61+
62+
- name: Commit changed files
63+
if: steps.changed.outputs.files_changed == 'true'
64+
uses: stefanzweifel/git-auto-commit-action@v5
65+
with:
66+
commit_message: "Update url"
67+
68+
outputs:
69+
changed: ${{ steps.changed.outputs.files_changed }}

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
_site
2+
.sass-cache
3+
.jekyll-cache
4+
.jekyll-metadata
5+
vendor
6+
debug.log
7+
__pycache__
8+
.cache
9+
!cache.db
10+
.DS_STORE
11+
.env*
12+
package.json
13+
package-lock.json
14+
yarn.lock
15+
node_modules

404.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: 404
3+
permalink: /404.html
4+
---
5+
6+
## {% include icon.html icon="fa-solid fa-heart-crack" %} Page Not Found
7+
8+
Try searching the whole site for the content you want:
9+
{:.center}
10+
11+
{% include site-search.html %}

CITATION.cff

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# citation metadata for the template itself
2+
3+
title: "NEUIR Lab"
4+
version: 2.0
5+
date-released: 2024-09-25
6+
url: "https://github.com/NEUIR/neuir.github.io"
7+
authors:
8+
- family-names: "Xin"
9+
given-names: "Haidong"
10+
cff-version: 2.0

Gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
source "https://rubygems.org"
2+
3+
# jekyll
4+
gem "jekyll", "~> 4.3"
5+
gem "webrick", "~> 1.7"
6+
gem "html-proofer", "~> 5.0"
7+
8+
# plugins
9+
group :jekyll_plugins do
10+
gem "jekyll-spaceship"
11+
gem "jekyll-sitemap"
12+
gem "jekyll-redirect-from"
13+
gem "jekyll-feed"
14+
gem "jekyll-last-modified-at"
15+
end

0 commit comments

Comments
 (0)