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

docs: add versioning #305

Merged
merged 5 commits into from
Apr 9, 2024
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
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,23 @@ jobs:
with:
ref: main
path: contrast-main
- uses: ./contrast-working/.github/actions/setup_nix
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
cachixToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Configure git
run: |
git config --global user.name "edgelessci"
git config --global user.email "[email protected]"
- name: Create docs release
working-directory: contrast-main/docs
run: |
nix run .#yarn install
nix run .#yarn docusaurus docs:version ${{ needs.process-inputs.outputs.WITHOUT_V }}
git add .
git commit -am "docs: release ${{ needs.process-inputs.outputs.WITHOUT_V }}"
# Clean up auxiliary files, so next steps run on a clean tree
git clean -fx :/
- name: Bump flake version to post release patch pre-version
id: bump
uses: ./contrast-working/.github/actions/bump_version # Run action from working branch!
Expand All @@ -127,6 +144,7 @@ jobs:
commit-message: ${{ steps.bump.outputs.commit-msg }}
base: main
draft: false
labels: "no changelog"
branch: automated/update-main-after-${{ needs.process-inputs.outputs.WORKING_BRANCH }}
committer: edgelessci <[email protected]>
author: edgelessci <[email protected]>
Expand Down
25 changes: 9 additions & 16 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contrast Documentation

## Previewing
## Previewing changes locally

The Contrast flake contains a development shell for working on the documentation.

Expand All @@ -19,20 +19,13 @@ yarn start

Browse to <http://localhost:3000/contrast> and choose the "Next" version in the top right.

## Publish process
## CI integration

The docs are updated with [publish-docs](../.github/workflows/publish-docs.yml) when pushed on main.
- **PR preview** Created by [`docs_publish`](../.github/workflows/docs_publish.yml) on PR.
This will build the website and push it to the [`/pr-preview` directory](https://github.com/edgelesssys/contrast/tree/gh-pages/pr-preview)of the `gh-pages` branch.
- **Publishing** Deployed by [`docs_publish`](../.github/workflows/docs_publish.yml) on push to main.
This will build the website and push it to the [`gh-pages` branch](https://github.com/edgelesssys/contrast/tree/gh-pages).
- **Actual deployment** happens through a [GitHub controlled action](https://github.com/edgelesssys/contrast/actions/workflows/pages/pages-build-deployment).
- **Release versioning** happens as part of the [release workflow](../.github/workflows/release.yml)

## Release process

1. [Tagging a new version](https://docusaurus.io/docs/next/versioning#tagging-a-new-version)

```shell
npm run docusaurus docs:version X.X
```

When tagging a new version, the document versioning mechanism will:

Copy the full `docs/docs/` folder contents into a new `docs/versioned_docs/version-[versionName]/` folder.
Create a versioned sidebars file based from your current sidebar configuration (if it exists) - saved as `docs/versioned_sidebars/version-[versionName]-sidebars.json`.
Append the new version number to `versions.json`.
Check out the [latest deployments](https://github.com/edgelesssys/contrast/deployments) (both main and PR preview).
18 changes: 0 additions & 18 deletions docs/docs/_media/contrast_icon.svg

This file was deleted.

File renamed without changes
2 changes: 1 addition & 1 deletion docs/docs/examples/emojivoto.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Confidential emoji voting

<!-- TODO(katexochen): create a screenshot with fixed format -->
![screenshot of the emojivoto UI](../../static/img/emoijvoto.png)
![screenshot of the emojivoto UI](../_media/emoijvoto.png)

**This tutorial guides you through deploying [emojivoto](https://github.com/BuoyantIO/emojivoto) as a
confidential Contrast deployment and validating the deployment from a voters perspective.**
Expand Down
4 changes: 1 addition & 3 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async function createConfig() {
items: [
{
label: 'Newsletter',
href: 'https://www.edgeless.systems/#footer'
href: 'https://www.edgeless.systems/#footer-id'
},
],
},
Expand All @@ -124,7 +124,6 @@ async function createConfig() {
label: 'LinkedIn',
href: 'https://www.linkedin.com/company/edgeless-systems/',
},

{
label: 'Youtube',
href: 'https://www.youtube.com/channel/UCOOInN0sCv6icUesisYIDeA',
Expand All @@ -145,7 +144,6 @@ async function createConfig() {
{
html: `<a href="javascript: Cookiebot.renew()" class="footer__link-item">Cookie Settings</a>`
},

{
label: 'Contact Us',
href: 'https://www.edgeless.systems/contact-us/',
Expand Down