How to deploy this website?
Published:
Update: I use GitHub actions to deploy this webpage to my local server, it no longer needs to be compiled locally. Now we can complete CV, and homepage (via Jekyll) simultaneously. Here are my GitHub actions
name: Build and Deploy Jekyll Site
on:
push:
branches:
- master # Set your default branch here
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Prepare deployment directory
run: mkdir www _site
- name: Build site
uses: docker://jekyll/jekyll:latest
with:
args: "jekyll build"
- name: Compile LaTeX document for resume
uses: xu-cheng/latex-action@master
with:
working_directory: CV/
root_file: main.tex
args: -xelatex -file-line-error -interaction=nonstopmode
- name: Copy site to www
run: |
cp -r _site/* www/
cp -r assets/* www/assets/
cp -r files/* www/files/
cp -r images/* www/images/
cp CV/main.pdf www/files/cv.pdf
# This step also requires SSH keys to be set up in the secrets.
- name: rsync deployments
uses: burnett01/rsync-deployments@5.2.1
with:
switches: -avzr --delete
path: ./www/
remote_path: ~/www/
remote_host: $
remote_user: $
remote_key: $
Develop the academia homepage and deploy it on a non-admin server.
I don’t have the admin right on the department server, so it would be messy to install ruby or docker on that server without admins’ permission. My method is to complie the html files on my own machine and copy those files to the department server. I keep the html files on www/
folder and here’s my script
rm -rf www/
docker run --rm --volume="$PWD:/srv/jekyll:Z" -it jekyll/jekyll jekyll clean
docker run --rm --volume="$PWD:/srv/jekyll:Z" -it jekyll/jekyll jekyll build
mkdir www/
cp -r _site/* www/
cp -r assets/* www/assets/
cp -r files/* www/files/
cp -r images/* www/images/
rsync -azi --delete ./www/ USRNAME@SERVER:~/www/
Below is the instructions for the file structure copied from the original template
Locations of key files/directories
- Basic config options: _config.yml
- Top navigation bar config: _data/navigation.yml
- Single pages: _pages/
- Collections of pages are .md or .html files in:
- _publications/
- _portfolio/
- _posts/
- _teaching/
- _talks/
- Footer: _includes/footer.html
- Static files (like PDFs): /files/
- Profile image (can set in _config.yml): images/profile.png
Tips and hints
- Name a file “.md” to have it render in markdown, name it “.html” to render in HTML.
- Go to the commit list (on your repo) to find the last version Github built with Jekyll.
- Green check: successful build
- Orange circle: building
- Red X: error
- No icon: not built
Resources
Markdown guide
Header three
Header four
Header five
Header six
Blockquotes
Single line blockquote:
Quotes are cool.
Tables
Table 1
Entry | Item | |
---|---|---|
John Doe | 2016 | Description of the item in the list |
Jane Doe | 2019 | Description of the item in the list |
Doe Doe | 2022 | Description of the item in the list |
Table 2
Header1 | Header2 | Header3 |
---|---|---|
cell1 | cell2 | cell3 |
cell4 | cell5 | cell6 |
cell1 | cell2 | cell3 |
cell4 | cell5 | cell6 |
Foot1 | Foot2 | Foot3 |
Definition Lists
- Definition List Title
- Definition list division.
- Startup
- A startup company or startup is a company or temporary organization designed to search for a repeatable and scalable business model.
- #dowork
- Coined by Rob Dyrdek and his personal body guard Christopher “Big Black” Boykins, “Do Work” works as a self motivator, to motivating your friends.
- Do It Live
- I’ll let Bill O’Reilly explain this one.
Unordered Lists (Nested)
- List item one
- List item one
- List item one
- List item two
- List item three
- List item four
- List item two
- List item three
- List item four
- List item one
- List item two
- List item three
- List item four
Ordered List (Nested)
- List item one
- List item one
- List item one
- List item two
- List item three
- List item four
- List item two
- List item three
- List item four
- List item one
- List item two
- List item three
- List item four
Buttons
Make any link standout more when applying the .btn
class.
Notices
Watch out! You can also add notices by appending {: .notice}
to a paragraph.
HTML Tags
Address Tag
1 Infinite LoopCupertino, CA 95014
United States
Anchor Tag (aka. Link)
This is an example of a link.
Abbreviation Tag
The abbreviation CSS stands for “Cascading Style Sheets”.
Cite Tag
“Code is poetry.” —Automattic
Code Tag
You will learn later on in these tests that word-wrap: break-word;
will be your best friend.
Strike Tag
This tag will let you strikeout text.
Emphasize Tag
The emphasize tag should italicize text.
Insert Tag
This tag should denote inserted text.
Keyboard Tag
This scarcely known tag emulates keyboard text, which is usually styled like the <code>
tag.
Preformatted Tag
This tag styles large blocks of code.
.post-title { margin: 0 0 5px; font-weight: bold; font-size: 38px; line-height: 1.2; and here's a line of some really, really, really, really long text, just to see how the PRE tag handles it and to find out how it overflows; }
Quote Tag
Developers, developers, developers…
–Steve Ballmer
Strong Tag
This tag shows bold text.
Subscript Tag
Getting our science styling on with H2O, which should push the “2” down.
Superscript Tag
Still sticking with science and Isaac Newton’s E = MC2, which should lift the 2 up.
Variable Tag
This allows you to denote variables.