-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework doctesting and docs uploading
I want to minimize the number of times we actually build Julia on CI. This PR re-uses the output of `build_x86_64-linux-gnu`, and also adds a second, signed step to deploy the docs using an encrypted `DOCUMENTER_KEY`. Use `aws_uploader`
- Loading branch information
1 parent
74f226e
commit 685149c
Showing
9 changed files
with
123 additions
and
18 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,3 +1 @@ | ||
Salted__��b��u��� | ||
^A��+��y%b���v(�e�rR��N��y;�G� Q������m� | ||
��Q?����0�\��Q?1�tDU�� | ||
Salted__JLkN�A�ی�%4k4�Xx��\����7CV A�K����ˮ��9�a~X�O�-ԗ��Q_o�u�;S;��#"�Uq��Y� |
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
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,77 @@ | ||
steps: | ||
- group: "Upload" | ||
steps: | ||
- label: "upload docs" | ||
depends_on: | ||
- "doctest" | ||
# We only upload if one of the following criteria are true: | ||
# 1. The branch is `master`. | ||
# 2. The branch is `release-*`. | ||
# 3. The build is a tag build AND the tag is `v*`. | ||
# 4. The pipeline is `julia-buildkite`. | ||
if: ((build.branch == "master") || (build.branch =~ /^release-/) || (build.tag =~ /^v/)) || (pipeline.slug == "julia-buildkite") | ||
plugins: | ||
- JuliaCI/external-buildkite#v1: | ||
version: "./.buildkite-external-version" | ||
repo_url: "https://github.com/JuliaCI/julia-buildkite" | ||
- JuliaCI/julia#v1: | ||
# Drop default "registries" directory, so it is not persisted from execution to execution | ||
persist_depot_dirs: packages,artifacts,compiled | ||
# Use Julia v1.7 for upload, that's the version embedded in the documenter manifest | ||
version: '1.7' | ||
- staticfloat/sandbox#v1: | ||
# Use `aws_uploader` image, since it has things like `git` and `ssh` and whatnot | ||
rootfs_url: "https://github.com/JuliaCI/rootfs-images/releases/download/v5.27/aws_uploader.x86_64.tar.gz" | ||
rootfs_treehash: "cd5a62e570bda70932217641ec715b2f9fc1cd82" | ||
uid: 1000 | ||
gid: 1000 | ||
workspaces: | ||
# Include `/cache/repos` so that our `git` version introspection works. | ||
- "/cache/repos:/cache/repos" | ||
- staticfloat/cryptic#v2: | ||
files: | ||
- .buildkite/secrets/ssh_docs_deploy | ||
- staticfloat/ssh-agent#v1: | ||
keyfiles: | ||
- .buildkite/secrets/ssh_docs_deploy | ||
commands: | | ||
buildkite-agent artifact download --step "doctest" "julia-*-htmldocs.tar.gz" . | ||
echo "--- clone docs.julialang.org" | ||
mkdir -p ~/.ssh | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null | ||
git clone git@github.com:JuliaLang/docs.julialang.org -b gh-pages repo | ||
cd repo | ||
echo "--- deploy new docs" | ||
# Delete everything except for `.git` | ||
shopt -s extglob | ||
rm -rf !(".git") | ||
shopt -u extglob | ||
# Extract new docs build | ||
tar -zxf ../julia-*-htmldocs.tar.gz | ||
# Build commit message | ||
echo "build based on $${BUILDKITE_COMMIT}\n" > ../commit_message | ||
echo "build link: $${BUILDKITE_BUILD_URL}" >> ../commit_message | ||
# Add all files to our new commit | ||
git config --global user.name "Documenter.jl" | ||
git config --global user.email "documenter@juliadocs.github.io" | ||
git add . | ||
git commit -a -F ../commit_message | ||
if [[ "$${BUILDKITE_PIPELINE_SLUG}" == "julia-buildkite" ]]; then | ||
# If we're testing new CI configurations, push to a temporary branch, then delete it | ||
git push origin gh-pages:gh-pages-buildkite-$${BUILDKITE_COMMIT} | ||
git push -D origin gh-pages-buildkite-$${BUILDKITE_COMMIT} | ||
else | ||
git push origin gh-pages:gh-pages | ||
fi | ||
timeout_in_minutes: 45 | ||
agents: | ||
queue: "julia" | ||
sandbox_capable: "true" | ||
os: "linux" | ||
arch: "x86_64" |
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
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 +1 @@ | ||
Salted__ڰ�]����K��:�m���!��"�v0$�0�������$Z��'�����Z�ᣳ>}��m���fSsghE�賬���V�2r�Q | ||
Salted__�osd���t(�B>� �nv�,��� ߺ����3lY��8��LU�_��8%�n��3O�(|A�me����0�b�EY�E��ݶb |
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 +1 @@ | ||
Salted__%�6���kc����;�t���X��<���o�F̛M@�lrT� ZT�:-u=U�X��-D�%������ʌ���0������B��CNO�F | ||
Salted__$WE�&�?�L�m˜����yB������o[Rp� �k�G+����W�D��;}���z���s�uJ�3�&lM�%q�a��\W_ |
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,13 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Get the `.buildkite/utilities/docs` folder path | ||
DOCS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
echo "--- Download built docs" | ||
buildkite-agent artifact download --step "doctest" "julia-*-htmldocs.tar.gz" | ||
|
||
echo "--- Deploy docs" | ||
export DOCUMENTER_KEY="$(cat .buildkite/secrets/ssh_docs_deploy)" | ||
echo "Do something here!" |