forked from HugoBlox/theme-academic-cv
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from AIR-DI/dev
Update the website to newest Hugo Blox style.
- Loading branch information
Showing
149 changed files
with
2,358 additions
and
1,474 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
github: gcushen | ||
custom: https://wowchemy.com/sponsor/ | ||
custom: https://hugoblox.com/sponsor/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Hugo Blox GitHub Action to convert Bibtex publications to Markdown-based webpages | ||
name: Import Publications From Bibtex | ||
|
||
# Require permission to create a PR | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
# Run workflow when a `.bib` file is added or updated in the `data/` folder | ||
on: | ||
push: | ||
branches: ['main'] | ||
paths: ['publications.bib'] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
hugoblox: | ||
if: github.repository_owner != 'HugoBlox' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install academic==0.10.0 | ||
- name: Run Academic (Bibtex To Markdown Converter) | ||
# Check `.bib` file exists for case when action runs on `.bib` deletion | ||
# Note GH only provides hashFiles func in `steps.if` context, not `jobs.if` context | ||
if: ${{ hashFiles('publications.bib') != '' }} | ||
run: academic import publications.bib content/publication/ --compact | ||
- name: Create Pull Request | ||
# Set ID for `Check outputs` stage | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: 'content: import publications from Bibtex' | ||
title: Hugo Blox Builder - Import latest publications | ||
body: | | ||
Import the latest publications from `publications.bib` to `content/publication/`. | ||
将最新的出版物从`publications.bib`导入到`content/publication/`。 | ||
[View Documentation](https://github.com/GetRD/academic-file-converter) | ||
base: main | ||
labels: automated-pr, content | ||
branch: hugoblox-import-publications | ||
delete-branch: true | ||
- name: Check outputs | ||
if: ${{ steps.cpr.outputs.pull-request-number }} | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Deploy website to GitHub Pages | ||
|
||
env: | ||
WC_HUGO_VERSION: '0.126.3' | ||
|
||
on: | ||
# Trigger the workflow every time you push to the `main` branch | ||
push: | ||
branches: ["main"] | ||
# Allows you to run this workflow manually from the Actions tab on GitHub. | ||
workflow_dispatch: | ||
|
||
# Provide permission to clone the repo and deploy it to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build website | ||
build: | ||
if: github.repository_owner != 'HugoBlox' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Fetch history for Hugo's .GitInfo and .Lastmod | ||
fetch-depth: 0 | ||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: ${{ env.WC_HUGO_VERSION }} | ||
extended: true | ||
- uses: actions/cache@v3 | ||
with: | ||
path: /tmp/hugo_cache_runner/ | ||
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }} | ||
restore-keys: | | ||
${{ runner.os }}-hugomod- | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
- name: Build with Hugo | ||
env: | ||
HUGO_ENVIRONMENT: production | ||
run: | | ||
echo "Hugo Cache Dir: $(hugo config | grep cachedir)" | ||
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Generate Pagefind search index | ||
run: npx pagefind --site "public" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: ./public | ||
|
||
# Deploy website to GitHub Pages hosting | ||
deploy: | ||
if: github.repository_owner != 'HugoBlox' | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-113 KB
assets/media/albums/demo/glenn-carstens-peters-npxXWgQ33ZQ-unsplash.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-94.5 KB
assets/media/albums/demo/priscilla-du-preez-K8XYGbw4Ahg-unsplash.jpg
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.