Skip to content

CLDR-14829 Wrong ordinal in French #5698

CLDR-14829 Wrong ordinal in French

CLDR-14829 Wrong ordinal in French #5698

Workflow file for this run

name: gh-pages
env:
CLDR_DIR: ${{ github.workspace }}
AUTO_BRANCH: auto/tr35/main
AUTO_REMOTE: origin
# Note: we have a foot in two camps here, maybe more
#
# - docs/ldml is the spec, and it gets special handling and generation. Ends up cldr-smoke for now
# - docs/rfc needs to end up somewhere. for now, generate to github.io
# - docs/site is an entire 'site' that gets deployed to what will be cldr.unicode.org
# This is now handled in site.yml
permissions:
pages: write
deployments: write
id-token: write
actions: read
on:
pull_request:
push:
branches:
- main
- "maint/maint-*"
tags:
- "release-*"
# Only run if docs change.
paths:
- "tools/scripts/tr-archive/**"
- "docs/**"
- ".github/workflows/gh-pages.yml"
jobs:
build:
name: "Build Github Pages"
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
lfs: false
fetch-depth: 1
- name: Cache local npm repository
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-nodetr-${{ hashFiles('tools/scripts/tr-archive/package-lock.json') }}
restore-keys: |
${{ runner.os }}-nodetr-
nodetr-
- uses: nodenv/actions/node-version@v4 # setup using .node-version
- name: Run TR archiver
# Note: will update ToC if out of date
run: "cd tools/scripts/tr-archive/ && npm ci && npm run build"
- name: Run Kbd Charts
run: "cd docs/charts/keyboards && npm ci && npm run build"
- name: Upload tr35.zip
uses: actions/upload-artifact@v4
with:
name: tr35-spec
path: tools/scripts/tr-archive/tr35.zip
- name: "Check internal anchors in spec"
# Note: see CLDR-16526 for making this an error
# see <tools/scripts/tr-archive/README.md> for instructions
run: "cd tools/scripts/tr-archive/ && npm run extract-link-targets"
- name: Lint Markdown
# Warn, don't fail yet
run: npx markdownlint-cli *.md {specs,docs}/*.md || (echo Warning, please fix these ; true)
- name: Note any changes
# if the archiver had to update anything, or if anchors changed
run: git status ; git diff
- name: Restore lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Run lychee
uses: lycheeverse/lychee-action@v1
with:
args: "-n --cache --max-cache-age 10d docs/rfc docs/ldml"
fail: false
format: markdown
output: linkcheck.md
- name: Link Checker Summary
run: cat linkcheck.md >> $GITHUB_STEP_SUMMARY
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Build Jekyll part of the site (not spec, not site/)
run: |
gem install bundler github-pages kramdown-parser-gfm # should pull in jekyll, etc.
cd docs && github-pages build && mkdir -vp ../_site/ldml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rearrange stuff
run: "cp -vr tools/scripts/tr-archive/dist/* ./_site/ldml/ && cp tools/scripts/tr-archive/reports-v2.css ./_site/"
- name: Deploy to GitHub Pages (main)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
- name: Deploy to Smoketest
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push'
shell: bash
env:
RSA_KEY_CCC: ${{ secrets.RSA_KEY_CCC }}
# the SSH port
CCC_USER: ${{ secrets.CCC_USER }}
CCC_PORT: 22
# the SSH host
CCC_HOST: cldr-smoke.unicode.org
# the ~/.ssh/known_hosts line mentioning SMOKETEST_HOST
CCC_KNOWNHOSTS: ${{ secrets.CCC_KNOWNHOSTS }}
run: |
echo "::group::Publish HTML"
echo "${RSA_KEY_CCC}" > ${HOME}/.key && chmod go= ${HOME}/.key
echo "${CCC_KNOWNHOSTS}" > ${HOME}/.knownhosts && chmod go= ${HOME}/.knownhosts
rsync -cav --delete-after -e "ssh -o UserKnownHostsFile=${HOME}/.knownhosts -i ${HOME}/.key -p ${CCC_PORT}" ./_site/ ${CCC_USER}@${CCC_HOST}:spec/$(basename ${GITHUB_REF_NAME})/
echo "::endgroup::"
echo "Now go to https://cldr-smoke.unicode.org/spec/"$(basename ${GITHUB_REF_NAME})
- name: Verify SpecFix Changes
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main'
id: gitstatus
run: |
echo '### tr35 fixups' >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
git status | tee -a $GITHUB_STEP_SUMMARY
git diff --stat | tee -a $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
( echo changecount=$(git diff 2>/dev/null | wc -l) ) | tee -a $GITHUB_OUTPUT
# bump modification section if needed.
bash tools/scripts/tr-archive/check-mod-section.sh HEAD "origin/$BASE_REF" >/dev/null || echo '<!--' 'Auto SpecFix' $(date) '-->' | tee -a docs/ldml/tr35-modifications.md
env:
BASE_REF: ${{ github.base_ref }}
- name: Update SpecFix branch
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.gitstatus.outputs.changecount > 0
run: |
set -euxo pipefail
git config user.name 'gh-pages.yml [bot]'
git config user.email 'unicode-org@users.noreply.github.com'
git add docs/ldml
bash .github/workflows/cldr-modify-commit.sh gh-pages.yml SpecFix
git log -n 1
git checkout -b ${AUTO_BRANCH}
# reset origin using token
git remote set-url ${AUTO_REMOTE} "https://unicode-org:${GH_TOKEN}@github.com/unicode-org/cldr.git"
# push ONLY if files under common/ are out of date.
bash .github/workflows/cldr-modify-push-if-needed.sh ${AUTO_REMOTE} ${AUTO_BRANCH} docs/ldml/
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Open SpecFix PR
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.gitstatus.outputs.changecount > 0
run: |
set -euxo pipefail
( gh pr create \
--title $(git log --pretty=%s HEAD | head -1 | cut -d' ' -f1)" auto: SpecFix" \
--body $(git log --pretty=%s HEAD | head -1 | cut -d' ' -f1)" Automatically created, see CLDR-16083" \
--base 'main' \
--reviewer 'unicode-org/cldr-brs' \
--label 'automatic' \
--head ${AUTO_BRANCH} \
| tee -a $GITHUB_STEP_SUMMARY ) || ( echo "# Could not create PR - may already exist" | tee -a $GITHUB_STEP_SUMMARY )
env:
GH_TOKEN: ${{ github.token }}
deploy:
name: "Deploy to GitHub Pages"
# only deploy from main branch of main repo
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push' && github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4.0.5
# only run one deployment at once.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true