Skip to content

Commit

Permalink
social: add work url (#171)
Browse files Browse the repository at this point in the history
* social: add work url

* Deploy: --dry-run -> --no-push
  • Loading branch information
junghans authored Jan 5, 2021
1 parent 625fb69 commit c4be6f8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
if [[ ${GITHUB_REF} = refs/pull/*/merge ]]; then # pull request
echo "::set-output name=SRC_BRANCH::${GITHUB_HEAD_REF}"
echo "::set-output name=DRY_RUN::--dry-run"
echo "::set-output name=NO_PUSH::--no-push"
elif [[ ${GITHUB_REF} = refs/heads/* ]]; then # branch, e.g. master, source etc
echo "::set-output name=SRC_BRANCH::${GITHUB_REF#refs/heads/}"
fi
Expand All @@ -47,6 +47,6 @@ jobs:
echo "::set-output name=DEPLOY_BRANCH::gh-pages"
fi
- name: Deploy website
run: yes | bin/deploy --verbose ${{ steps.setup.outputs.DRY_RUN }}
run: yes | bin/deploy --verbose ${{ steps.setup.outputs.NO_PUSH }}
--src ${{ steps.setup.outputs.SRC_BRANCH }}
--deploy ${{ steps.setup.outputs.DEPLOY_BRANCH }}
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ quora_username: # your Quora username
publons_id: # your ID on Publons
research_gate_profile: # your profile on ResearchGate
blogger_url: # your blogger URL
work_url: # work page URL
keybase_username: # your keybase user name

contact_note: >
Expand Down
3 changes: 2 additions & 1 deletion _includes/social.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span class="contact-icon text-center">
<a href="mailto:{{ site.email | encode_email }}"><i class="fas fa-envelope"></i></a>
{% if site.email %}<a href="mailto:{{ site.email | encode_email }}"><i class="fas fa-envelope"></i></a>{% endif %}
{% if site.orcid_id %}<a href="https://orcid.org/{{ site.orcid_id }}" target="_blank" title="ORCID"><i class="ai ai-orcid"></i></a>{% endif %}
{% 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 %}
{% 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 %}
Expand All @@ -10,6 +10,7 @@
{% if site.medium_username %}<a href="https://medium.com/@{{ site.medium_username }}" target="_blank" title="Medium"><i class="fab fa-medium"></i></a>{% endif %}
{% 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 %}
{% if site.blogger_url %}<a href="{{ site.blogger_url }}" target="_blank" title="Blogger"><i class="fab fa-blogger-b"></i></a>{% endif %}
{% if site.work_url %}<a href="{{ site.work_url }}" target="_blank" title="Work"><i class="fas fa-briefcase"></i></a>{% endif %}
{% 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 %}
{% if site.keybase_username %}<a href="https://keybase.io/{{ site.keybase_username }}" target="_blank" title="Keybase"><i class="fab fa-keybase"></i></a>{% endif %}
</span>
8 changes: 4 additions & 4 deletions bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
SRC_BRANCH="master"
DEPLOY_BRANCH="gh-pages"

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

while [[ $# > 0 ]]; do
key="$1"
Expand All @@ -32,8 +32,8 @@ while [[ $# > 0 ]]; do
--verbose)
set -x
;;
--dry-run)
DRY_RUN="--dry-run"
--no-push)
NO_PUSH="--no-push"
;;
*)
echo "Option $1 is unknown." >&2
Expand Down Expand Up @@ -93,7 +93,7 @@ rm -R _site/
# Push to DEPLOY_BRANCH
git add -fA
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
git push ${DRY_RUN} -f -q origin $DEPLOY_BRANCH
[[ ${NO_PUSH} ]] || git push -f -q origin $DEPLOY_BRANCH

# Move back to SRC_BRANCH
git checkout $SRC_BRANCH
Expand Down

0 comments on commit c4be6f8

Please sign in to comment.