Skip to content

Commit c4be6f8

Browse files
authored
social: add work url (alshedivat#171)
* social: add work url * Deploy: --dry-run -> --no-push
1 parent 625fb69 commit c4be6f8

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.github/workflows/deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
3838
if [[ ${GITHUB_REF} = refs/pull/*/merge ]]; then # pull request
3939
echo "::set-output name=SRC_BRANCH::${GITHUB_HEAD_REF}"
40-
echo "::set-output name=DRY_RUN::--dry-run"
40+
echo "::set-output name=NO_PUSH::--no-push"
4141
elif [[ ${GITHUB_REF} = refs/heads/* ]]; then # branch, e.g. master, source etc
4242
echo "::set-output name=SRC_BRANCH::${GITHUB_REF#refs/heads/}"
4343
fi
@@ -47,6 +47,6 @@ jobs:
4747
echo "::set-output name=DEPLOY_BRANCH::gh-pages"
4848
fi
4949
- name: Deploy website
50-
run: yes | bin/deploy --verbose ${{ steps.setup.outputs.DRY_RUN }}
50+
run: yes | bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }}
5151
--src ${{ steps.setup.outputs.SRC_BRANCH }}
5252
--deploy ${{ steps.setup.outputs.DEPLOY_BRANCH }}

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ quora_username: # your Quora username
5151
publons_id: # your ID on Publons
5252
research_gate_profile: # your profile on ResearchGate
5353
blogger_url: # your blogger URL
54+
work_url: # work page URL
5455
keybase_username: # your keybase user name
5556

5657
contact_note: >

_includes/social.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<span class="contact-icon text-center">
2-
<a href="mailto:{{ site.email | encode_email }}"><i class="fas fa-envelope"></i></a>
2+
{% if site.email %}<a href="mailto:{{ site.email | encode_email }}"><i class="fas fa-envelope"></i></a>{% endif %}
33
{% if site.orcid_id %}<a href="https://orcid.org/{{ site.orcid_id }}" target="_blank" title="ORCID"><i class="ai ai-orcid"></i></a>{% endif %}
44
{% if site.scholar_userid %}<a href="https://scholar.google.com/citations?user={{ site.scholar_userid }}" target="_blank" title="Google Scholar"><i class="ai ai-google-scholar"></i></a>{% endif %}
55
{% if site.publons_id %}<a href="https://publons.com/a/{{ site.publons_id }}/" target="_blank" title="Publons"><i class="ai ai-publons"></i></a>{% endif %}
@@ -10,6 +10,7 @@
1010
{% if site.medium_username %}<a href="https://medium.com/@{{ site.medium_username }}" target="_blank" title="Medium"><i class="fab fa-medium"></i></a>{% endif %}
1111
{% if site.quora_username %}<a href="https://www.quora.com/profile/{{ site.quora_username }}" target="_blank" title="Quora"><i class="fab fa-quora"></i></a>{% endif %}
1212
{% if site.blogger_url %}<a href="{{ site.blogger_url }}" target="_blank" title="Blogger"><i class="fab fa-blogger-b"></i></a>{% endif %}
13+
{% if site.work_url %}<a href="{{ site.work_url }}" target="_blank" title="Work"><i class="fas fa-briefcase"></i></a>{% endif %}
1314
{% if site.strava_userid %}<a href="https://www.strava.com/athletes/{{ site.strava_userid }}" target="_blank" title="Strava"><i class="fab fa-strava"></i></a>{% endif %}
1415
{% if site.keybase_username %}<a href="https://keybase.io/{{ site.keybase_username }}" target="_blank" title="Keybase"><i class="fab fa-keybase"></i></a>{% endif %}
1516
</span>

bin/deploy

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
SRC_BRANCH="master"
88
DEPLOY_BRANCH="gh-pages"
99

10-
USAGE_MSG="usage: deploy [-h|--help] [-u|--user] [-s|--src SRC_BRANCH] [-d|--deploy DEPLOY_BRANCH] [--verbose] [--dry-run]"
10+
USAGE_MSG="usage: deploy [-h|--help] [-u|--user] [-s|--src SRC_BRANCH] [-d|--deploy DEPLOY_BRANCH] [--verbose] [--no-push]"
1111

1212
while [[ $# > 0 ]]; do
1313
key="$1"
@@ -32,8 +32,8 @@ while [[ $# > 0 ]]; do
3232
--verbose)
3333
set -x
3434
;;
35-
--dry-run)
36-
DRY_RUN="--dry-run"
35+
--no-push)
36+
NO_PUSH="--no-push"
3737
;;
3838
*)
3939
echo "Option $1 is unknown." >&2
@@ -93,7 +93,7 @@ rm -R _site/
9393
# Push to DEPLOY_BRANCH
9494
git add -fA
9595
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
96-
git push ${DRY_RUN} -f -q origin $DEPLOY_BRANCH
96+
[[ ${NO_PUSH} ]] || git push -f -q origin $DEPLOY_BRANCH
9797

9898
# Move back to SRC_BRANCH
9999
git checkout $SRC_BRANCH

0 commit comments

Comments
 (0)