Skip to content

Commit

Permalink
Only push website changes when a tag is created.
Browse files Browse the repository at this point in the history
Before this PR, every commit merged into main would trigger an update to
our public website. This meant that the docs would reference code that
wasn't yet merged into a stable release. This led to a lot of confusion
as people tried to follow along with the docs, but nothing worked.

This PR changes the GitHub Action to only update the website when we
make a new tag for a release. You can also manually trigger the action
if you want. In the future, we should consider versioning our
documentation and allowing people to view old versions?
  • Loading branch information
mwhittaker committed Jun 2, 2023
1 parent f38fa2e commit ad383c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
name: Deploy website to GitHub Pages

on:
# Runs on pushes targeting the main branch
# Runs when new semantic version tags are created.
push:
branches: ["main"]
tags:
- 'v*.*.*'
- '!v*.*.*-*' # Ignore pre-release identifiers like 1.4.0-beta.

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
5 changes: 0 additions & 5 deletions website/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1314,11 +1314,6 @@ func TestArithmetic(t *testing.T) {
}
```

<div hidden class="todo">
TODO(mwhittaker): Explain how you can unit test a component directly, but it's
not as recommended.
</div>

# Versioning

Serving systems evolve over time. Whether you're fixing bugs or adding new
Expand Down

0 comments on commit ad383c8

Please sign in to comment.