From f7bbfe50adf750b2a5697925ef9632192c376e47 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sat, 10 Oct 2026 16:47:00 +0700 Subject: [PATCH] ci(refresh-dictionary): target main now that the dev branch is gone --- .github/workflows/ci.yml | 2 +- .github/workflows/proto.yml | 2 +- .github/workflows/refresh-dictionary.yml | 10 +++++----- README.md | 2 +- docs/deployment.md | 5 ++--- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d42740..6ddc870 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ name: ci on: push: - branches: [main, dev] + branches: [main] pull_request: release: types: [published] diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index df6d51c..b127d4c 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -7,7 +7,7 @@ name: proto on: push: - branches: [main, dev] + branches: [main] pull_request: permissions: diff --git a/.github/workflows/refresh-dictionary.yml b/.github/workflows/refresh-dictionary.yml index f615c00..e344601 100644 --- a/.github/workflows/refresh-dictionary.yml +++ b/.github/workflows/refresh-dictionary.yml @@ -3,15 +3,15 @@ # Wikimedia regenerates the Wiktionary tiếng Việt dump every month. This # downloads the current one, regenerates data/dictionary.txt from it — the # committed corpus the image is built from — and opens a pull request against -# dev, so a new month's words arrive as a diff someone reads before it ships. +# main, so a new month's words arrive as a diff someone reads before it ships. # # The dump run that starts on the 1st takes a few days to publish, hence the # 10th. The builder fails below its word, page and meaning-coverage floors, so # a broken month opens no pull request rather than a corpus with holes in it. # # A pull request opened with GITHUB_TOKEN does not trigger ci.yml. The build -# here already verifies the database it derives; the full suite runs when dev -# is merged onward. +# here already verifies the database it derives; the full suite runs when the +# pull request is merged. name: refresh-dictionary on: @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: dev + ref: main - uses: actions/setup-go@v5 with: go-version: stable @@ -73,7 +73,7 @@ jobs: - name: Open the pull request uses: peter-evans/create-pull-request@v7 with: - base: dev + base: main branch: dictionary-refresh delete-branch: true add-paths: data/dictionary.txt diff --git a/README.md b/README.md index 16021de..c593944 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ The dictionary is committed as text: [`data/dictionary.txt`](./data/dictionary.t every word the builder accepted from the Wiktionary tiếng Việt dump, one per line with its meanings, and a header naming the dump and its SHA-256. Wikimedia regenerates the dump monthly, and the [`refresh-dictionary`](./.github/workflows/refresh-dictionary.yml) workflow -opens a pull request against `dev` with the new month's corpus on the 10th, so every change +opens a pull request against `main` with the new month's corpus on the 10th, so every change to the word list is a reviewable diff. To refresh by hand, `make fetch-dict` (downloads the ~61 MB dump) then `make refresh-dict`. Neither the dump nor `data/noitu.db` is committed. See [`data/ATTRIBUTION.md`](./data/ATTRIBUTION.md). diff --git a/docs/deployment.md b/docs/deployment.md index facc2ff..8e5aa74 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -391,9 +391,8 @@ the dump it came from. [`refresh-dictionary.yml`](../.github/workflows/refresh-dictionary.yml) downloads the current dump on the 10th of every month, or on demand from the -Actions tab, regenerates the corpus and opens a pull request against `dev`. -Merging it, and `dev` onward to `main`, deploys the new words like any other -change. The pull request does not trigger CI, because GitHub does not run +Actions tab, regenerates the corpus and opens a pull request against `main`. +Merging it deploys the new words like any other change. The pull request does not trigger CI, because GitHub does not run workflows on a pull request opened with `GITHUB_TOKEN`; the builder verifies the database before exporting the corpus, and CI runs again on the merge. GitHub disables scheduled workflows after 60 days without a commit to the