Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version website with Mike #48

Merged
merged 3 commits into from
Sep 5, 2023
Merged
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
8 changes: 7 additions & 1 deletion .docs-theme/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<meta name="google-site-verification" content="VN4-Orfu-TOf9hXInR_ZdaZXQJDiak-dmPuaBc9TlwE" />
{% endblock %}
{% block announce %}
<a href="/blog/2021/05/26/containerssh-0-4-1/">
<a href="/latest/blog/2021/05/26/containerssh-0-4-1">
ContainerSSH 0.4.1: Bugfixing Audit &amp; Proxy <strong>is now available</strong>! Read more &raquo;
</a>
{% endblock %}
Expand All @@ -45,4 +45,10 @@
{% block herocontent %}{% endblock %}
<div class="mdx-hero-separator"></div>
</section>
{% endblock %}
{% block outdated %}
You're not viewing the latest version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% endblock %}
2 changes: 1 addition & 1 deletion .docs-theme/overrides/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>Launch containers<br />on demand</h1>
</p>
</div>
<div class="mdx-hero__image">
<img src="/images/hero-header.svg" alt="" height="627" width="860" draggable="false">
<img src="images/hero-header.svg" alt="" height="627" width="860" draggable="false">
</div>
</div>
</div>
Expand Down
52 changes: 12 additions & 40 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:
pull_request:
branches-ignore:
- 'gh-pages'
schedule:
- cron: '0 * * * *'
jobs:
build:
name: Build
Expand All @@ -24,44 +22,18 @@ jobs:
architecture: x64
- name: Install requirements.txt
run: pip install -r requirements.txt
- name: Build
run: mkdocs build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: site
path: site/*
if-no-files-found: error
deploy:
name: Deploy
runs-on: ubuntu-latest
needs:
- build
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: gh-pages
path: dist
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: site
path: artifacts
- name: Deploy
- name: Setup git
run: |
set -euo pipefail
rsync -az --exclude=.git --delete ./artifacts/ ./dist/
cd dist
git config user.name "ContainerSSH Build Agent"
git config user.email [email protected]
git add .
if ! git diff-index --quiet HEAD --; then
git commit -m "Website publish"
git push --set-upstream --force origin gh-pages
fi
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git fetch origin gh-pages
- name: Deploy upcoming
run: mike deploy upcoming --push
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy version
run: mike deploy "$GITHUB_REF_NAME" --push
if: startsWith(github.ref, 'refs/heads/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ theme:
include_search_page: false
search_index_only: 'false'
extra:
version:
provider: mike
social:
- icon: fontawesome/brands/github
link: https://github.com/ContainerSSH
Expand Down Expand Up @@ -226,8 +228,6 @@ nav:
plugins:
- search
- macros
- blog:
format: ""
- redirects:
redirect_maps:
'security.md': 'about/security.md'
Expand Down Expand Up @@ -278,6 +278,6 @@ copyright: >
| <a href="https://github.com/ContainerSSH/branding/blob/main/README.md">Brand assets</a>
| <a href="/about/privacy/">Privacy Policy</a>
| <a href="/about/imprint/">Imprint</a><br /><br />
<img src="/images/logos/cncf-white.svg" alt="Cloud Native Computing Foundation" /><br />
<img src="images/logos/cncf-white.svg" alt="Cloud Native Computing Foundation" /><br />
We are a Cloud Native Computing Foundation sandbox project.<br /><br />
The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see <a href="https://www.linuxfoundation.org/trademark-usage/">Trademark Usage</a>. <a href="https://www.docker.com/legal/trademark-guidelines">Docker and the Docker logo are trademarks of Docker, Inc.</a>
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ PyGithub~=1.54
pyyaml>=5.3.1
requests
mkdocs-rss-plugin
mike