From c4be6f84575ca3ef1deb0ba12447c53083ad274a Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 5 Jan 2021 07:37:57 -0700 Subject: [PATCH] social: add work url (#171) * social: add work url * Deploy: --dry-run -> --no-push --- .github/workflows/deploy.yml | 4 ++-- _config.yml | 1 + _includes/social.html | 3 ++- bin/deploy | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f3bcf1a..eff1ac3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 @@ -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 }} diff --git a/_config.yml b/_config.yml index cf53ccd..91bb950 100644 --- a/_config.yml +++ b/_config.yml @@ -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: > diff --git a/_includes/social.html b/_includes/social.html index df745e8..8b38260 100644 --- a/_includes/social.html +++ b/_includes/social.html @@ -1,5 +1,5 @@ - + {% if site.email %}{% endif %} {% if site.orcid_id %}{% endif %} {% if site.scholar_userid %}{% endif %} {% if site.publons_id %}{% endif %} @@ -10,6 +10,7 @@ {% if site.medium_username %}{% endif %} {% if site.quora_username %}{% endif %} {% if site.blogger_url %}{% endif %} + {% if site.work_url %}{% endif %} {% if site.strava_userid %}{% endif %} {% if site.keybase_username %}{% endif %} diff --git a/bin/deploy b/bin/deploy index 2ee74f5..72b4e2f 100755 --- a/bin/deploy +++ b/bin/deploy @@ -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" @@ -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 @@ -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