Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Test #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions etc/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@

comment_tpl = """
A preview for this pull request is available at %s/%s/index.html.

Here are some links to the pages that were modified:

%s

_Since the preview frequently changes, please link to [this comment](%s), not to the direct url to the preview._
"""

def mk_comment(commit, comment, changes):
return {'body': comment_tpl % (rawgit, commit, '\n'.join('- %s %s/%s/%s.html' % (change['status'], rawgit, commit, change['filename']) for change in changes), comment)}

pr = os.environ.get('TRAVIS_PULL_REQUEST')
token = os.environ.get('KEY_PASS')
token = os.environ.get('ACCESS_TOKEN')

rawgit = 'https://cdn.rawgit.com/LexBot/SpongeDocs'
rawgit = 'https://cdn.rawgit.com/LexBot/NeptuneDocs'
repo = 'https://api.github.com/repos/NeptunePowered/NeptuneDocs'
pr_repo = 'https://api.github.com/repos/LexBot/SpongeDocs'
pr_repo = 'https://api.github.com/repos/LexBot/NeptuneDocs'

commit = requests.get('%s/branches/%s' % (pr_repo, pr), auth=('x-oauth-basic', token)).json()['commit']['sha'][:8]

Expand Down
9 changes: 6 additions & 3 deletions etc/pr.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
#!/usr/bin/env bash

branch=${TRAVIS_PULL_REQUEST}
echo "Deploying PR #$branch"

# Deploy
cd build
mkdir deploy
cd deploy
git init
git remote add origin [email protected]:LexBot/NeptuneDocs.git
if git ls-remote origin | grep -sw "$branch"
if git ls-remote origin | grep -sw "$branch"; then
git fetch origin $branch
git checkout $branch
else
git checkout --orphan $branch
fi
cp -R ../build/. .
git add .
git commit -q -m "Deploy $(date)"
git push -q -f origin gh-pages
git push -q -f origin $branch
echo "Done! Successfully published docs!"
cd ../

Expand Down
1 change: 1 addition & 0 deletions etc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sphinx==1.2
requests==2.5.3
-e git+https://github.com/SpongePowered/sponge_docs_theme.git#egg=sponge_docs_theme
1 change: 1 addition & 0 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Introduction
============

Welcome to the Neptune Documentation, the official documentation for the `Neptune <http://www.neptunepowered.org/>`__ project.
Testing 123...........

.. warning::

Expand Down