-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add publish workflow to Github Actions
[noissue]
- Loading branch information
David Davis
committed
Nov 20, 2020
1 parent
aed6911
commit 8ca31db
Showing
3 changed files
with
36 additions
and
24 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
32 changes: 32 additions & 0 deletions
32
templates/github/.github/workflows/scripts/publish_docs.sh.j2
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
{% include 'header.j2' %} | ||
|
||
set -euv | ||
|
||
export WORKSPACE=$GITHUB_WORKSPACE | ||
export BRANCH="${GITHUB_REF##*/}" | ||
|
||
mkdir ~/.ssh | ||
echo "$PULP_DOCS_KEY" > ~/.ssh/pulp-infra | ||
chmod 600 ~/.ssh/pulp-infra | ||
|
||
echo "docs.pulpproject.org,8.43.85.236 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGXG+8vjSQvnAkq33i0XWgpSrbco3rRqNZr0SfVeiqFI7RN/VznwXMioDDhc+hQtgVhd6TYBOrV07IMcKj+FAzg=" >> ~/.ssh/known_hosts | ||
chmod 644 ~/.ssh/known_hosts | ||
|
||
pip3 install -r doc_requirements.txt | ||
|
||
export PYTHONUNBUFFERED=1 | ||
export DJANGO_SETTINGS_MODULE=pulpcore.app.settings | ||
export PULP_SETTINGS=$WORKSPACE/.github/settings/settings.py | ||
|
||
eval "$(ssh-agent -s)" #start the ssh agent | ||
ssh-add ~/.ssh/pulp-infra | ||
|
||
if [[ $GITHUB_REF = "refs/heads"* ]]; then | ||
type="nightly" | ||
else | ||
type="tag" | ||
fi | ||
|
||
python3 $WORKSPACE/.ci/scripts/docs-builder.py --build-type $type --branch $BRANCH |