-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create gh-pages GitHub Action workflow for automatic website deployme…
…nt (#1) * Create ghpages.yml * Fix pandoc-citeproc With workaround for jgm/pandoc-citeproc#420 (comment) . * Use source branch to store the conf files * Use Apr iinstead of April as April seems to create problems
- Loading branch information
1 parent
a85ddee
commit 10eeaac
Showing
2 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
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,40 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Print GitHub context | ||
env: | ||
GITHUB_EVENT: ${{ github.event_name }} | ||
GITHUB_REF: ${{ github.ref }} | ||
run: | | ||
echo $GITHUB_EVENT $GITHUB_REF | ||
- name: Generate Hugo Website | ||
run: | | ||
# workaround https://github.com/jgm/pandoc-citeproc/issues/420#issuecomment-549047862 | ||
export LANG=en_US.UTF-8 | ||
# Install dependencies | ||
sudo apt install python3 python3-pybtex pandoc-citeproc | ||
sudo snap install hugo | ||
# Generate bibliography pages | ||
cd bibliography | ||
python3 process_bibliography.py traversaro_pubs.bib | ||
cd .. | ||
# Run Hugo | ||
hugo -D | ||
- name: Deploy | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/source') | ||
uses: JamesIves/github-pages-deploy-action@master | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
BRANCH: master | ||
FOLDER: public |
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