Skip to content

Commit

Permalink
chore(ci): add a workflow to push to Algolia doc (#3833)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Sep 25, 2024
1 parent 2b4d310 commit 8b31d9e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ module.exports = {
},
],
},
{
// actions yml linter
files: ['.github/**/*.yml'],

rules: {
'yml/no-empty-mapping-value': 0,
},
},
{
// es linter
files: ['*.ts', '*.js'],
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/push-to-algolia-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Push specs and snippets to Algolia doc

on: workflow_dispatch

jobs:
release:
name: Scheduled Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Setup
id: setup
uses: ./.github/actions/setup
with:
type: minimal

- run: yarn workspace scripts pushToAlgoliaDoc
env:
GITHUB_TOKEN: ${{ secrets.ALGOLIA_BOT_TOKEN }}
FORCE: true
4 changes: 0 additions & 4 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
schedule:
- cron: '0 14 * * 5' # At 14:00 on Friday.
workflow_dispatch:
inputs:
fake_input:
description: input needed to satisfy the yaml linter
required: false

jobs:
renovate:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/scheduled-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ on:
schedule:
- cron: '30 6 * * 2'
workflow_dispatch:
inputs:
fake_input:
description: input needed to satisfy the yaml linter
required: false

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/codegen/pushToAlgoliaDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function pushToAlgoliaDoc(): Promise<void> {
.map((coAuthor) => coAuthor.trim())
.filter(Boolean);

if (!process.env.DRY_RUN && !lastCommitMessage.startsWith(commitStartRelease)) {
if (!process.env.FORCE && !lastCommitMessage.startsWith(commitStartRelease)) {
return;
}

Expand Down

0 comments on commit 8b31d9e

Please sign in to comment.