-
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.
gh actions: use secrets.GITHUB_TOKEN for deployment
- Loading branch information
Showing
1 changed file
with
29 additions
and
14 deletions.
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 |
---|---|---|
|
@@ -39,17 +39,32 @@ jobs: | |
with: | ||
name: manuscript-${{ github.run_id }}-${{ env.TRIGGERING_SHA_7 }} | ||
path: output | ||
- name: Deploy Manuscript | ||
if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
env: | ||
MANUBOT_SSH_PRIVATE_KEY: ${{ secrets.MANUBOT_SSH_PRIVATE_KEY }} | ||
CI_BUILD_WEB_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks | ||
CI_JOB_WEB_URL: https://github.com/${{ github.repository }}/runs/${{ github.run_id }} | ||
shell: bash --login {0} | ||
run: | | ||
if [ "$MANUBOT_SSH_PRIVATE_KEY" != "" ]; then | ||
bash ci/deploy.sh | ||
else | ||
echo >&2 "Skipping deployment because the MANUBOT_SSH_PRIVATE_KEY secret is not set. | ||
Instructions at https://github.com/manubot/rootstock/blob/master/SETUP.md#deploy-key" | ||
fi | ||
# - name: Deploy Manuscript | ||
# if: github.ref == 'refs/heads/master' && github.event_name == 'push' | ||
# env: | ||
# MANUBOT_SSH_PRIVATE_KEY: ${{ secrets.MANUBOT_SSH_PRIVATE_KEY }} | ||
# CI_BUILD_WEB_URL: https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks | ||
# CI_JOB_WEB_URL: https://github.com/${{ github.repository }}/runs/${{ github.run_id }} | ||
# shell: bash --login {0} | ||
# run: | | ||
# if [ "$MANUBOT_SSH_PRIVATE_KEY" != "" ]; then | ||
# bash ci/deploy.sh | ||
# else | ||
# echo >&2 "Skipping deployment because the MANUBOT_SSH_PRIVATE_KEY secret is not set. | ||
# Instructions at https://github.com/manubot/rootstock/blob/master/SETUP.md#deploy-key" | ||
# fi | ||
- name: Deploy Output | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./output | ||
publish_branch: output | ||
# commit_message: todo | ||
# user_name: todo | ||
# user_email: [email protected] | ||
- name: Deploy Webpage | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./webpage | ||
publish_branch: gh-pages |