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

Netlify deployment #4130

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
37 changes: 37 additions & 0 deletions .github/workflows/docs-netlify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish docs to Netlify

on:
release:
types: [published] # remove auto deploying docs everytime pull request is merged
workflow_dispatch:

permissions:
contents: write

jobs:
publish-docs:
name: Publish docs to Netlify
if: ${{ !github.event.release.prerelease }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work when manually running the workflow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it should work.

runs-on: ubuntu-latest
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: "16.x"
- name: Trigger Netlify deployment
env:
USE_SSH: true
GIT_USER: git
GA_KEY: ${{ secrets.GA_KEY }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
NODE_OPTIONS: "--max-old-space-size=4096"
run: |
git config --global user.email "corporate-it+weaveworks-docs-bot@weave.works"
git config --global user.name "weaveworks-docs-bot"
git switch docs-production
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the way you imagine hotfixes to the docs to land on the website is to issue PRs against docs-production which is ok in my opinion. That way we can use main as dev branch for the next release. But we need to cleary document this new process.

git merge --no-edit "origin/main"
git push --force origin docs-production
# Publish success to slack????
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build]
base = "website"
publish = "build"
command = "npm run build"
[context.deploy-preview]
ignore = "git diff --quiet HEAD^ HEAD ./"
Loading