-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[noissue]
- Loading branch information
Showing
3 changed files
with
42 additions
and
24 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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# WARNING: DO NOT EDIT! | ||
# | ||
# This file was generated by plugin_template, and is managed by it. Please use | ||
# './plugin-template --github pulpcore' to update this file. | ||
# | ||
# For more info visit https://github.com/pulp/plugin_template | ||
|
||
set -euv | ||
|
||
# make sure this script runs at the repo root | ||
cd "$(dirname "$(realpath -e "$0")")"/../.. | ||
|
||
REF="${1#refs/}" | ||
REF_NAME="${REF#*/}" | ||
REF_TYPE="${REF%%/*}" | ||
|
||
mkdir ~/.ssh | ||
echo "$PULP_DOCS_KEY" > ~/.ssh/pulp-infra | ||
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=" >> /home/runner/.ssh/known_hosts | ||
|
@@ -26,8 +23,13 @@ ssh-add ~/.ssh/pulp-infra | |
|
||
make site | ||
|
||
# publish to docs.pulpproject.org/pulp_cli | ||
rsync -avzh site/ [email protected]:/var/www/docs.pulpproject.org/pulp_cli/ | ||
|
||
# publish to docs.pulpproject.org/pulp_cli/en/{release} | ||
rsync -avzh site/ [email protected]:/var/www/docs.pulpproject.org/pulp_cli/en/"$1" | ||
if [ "${REF_TYPE}" = "heads" ] | ||
then | ||
[ "${REF_NAME}" = "main" ] | ||
# publish to docs.pulpproject.org/pulp_cli | ||
rsync -avzh site/ [email protected]:/var/www/docs.pulpproject.org/pulp_cli/ | ||
else | ||
[ "${REF_TYPE}" = "tags" ] | ||
# publish to docs.pulpproject.org/pulp_cli/en/{release} | ||
rsync -avzh site/ [email protected]:/var/www/docs.pulpproject.org/pulp_cli/en/"${REF_NAME}" | ||
fi |
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
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,23 @@ | ||
name: pulp-cli Publish Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "docs/**" | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-docs: | ||
name: Publish docs | ||
needs: publish-pypi | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run publish docs script | ||
env: | ||
PULP_DOCS_KEY: ${{ secrets.PULP_DOCS_KEY }} | ||
run: | | ||
.ci/scripts/publish_docs.sh "${GITHUB_REF}" |