-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLDR-17803 docs/site: publish to CloudFlare, config updates (#3989)
- Loading branch information
Showing
9 changed files
with
114 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CLDR Site | ||
|
||
permissions: | ||
deployments: write | ||
id-token: write | ||
pull-requests: write | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
# - "tools/scripts/tr-archive/**" | ||
- "docs/site/**" | ||
- '.github/workflows/site.yml' | ||
push: | ||
branches: | ||
- main | ||
# Only run if docs change. | ||
paths: | ||
# - "tools/scripts/tr-archive/**" | ||
- "docs/site/**" | ||
- '.github/workflows/site.yml' | ||
|
||
jobs: | ||
cloudflare: | ||
runs-on: ubuntu-latest | ||
environment: cloudflare | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: false | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
- name: Setup Jekyll | ||
run: 'gem install bundler jekyll kramdown-parser-gfm webrick' | ||
- name: Build cldr.pages.dev | ||
run: 'cd docs/site && jekyll build' | ||
- name: Pre-install Wrangler | ||
run: npm i -g [email protected] | ||
# see https://github.com/cloudflare/wrangler-action/issues/286 | ||
- name: Deploy cldr.pages.dev | ||
id: deploy | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
command: pages deploy ./_site --project-name=cldr | ||
- name: Add deploy comment to PR | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: '✨ deployed to <${{ steps.deploy.outputs.deployment-url }}>' | ||
}) | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['Site Update'] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This is the config file for cldr.unicode.org | ||
|
||
name: CLDR Site | ||
title: CLDR Site | ||
|
||
markdown: kramdown | ||
input: GFM | ||
|
||
destination: ../../_site | ||
|
||
# Google Analytics | ||
ga_tracking: UA-7672775-1 | ||
ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings | ||
|
||
# everything should default to the 'page' layout | ||
defaults: | ||
- scope: | ||
path: '' | ||
values: | ||
layout: page | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/_site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
FROM jekyll/jekyll | ||
FROM jekyll/jekyll:4.2.2 | ||
RUN gem install bundler github-pages kramdown-parser-gfm webrick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
# Previewing locally | ||
# Docker for CLDR Site | ||
|
||
## Previewing locally | ||
|
||
1. install https://docker.io | ||
2. `docker compose up` | ||
3. visit <http://127.0.0.1:4000> | ||
4. hit control-C to cancel the docker run. | ||
|
||
## Building | ||
|
||
1. `docker compose run -w /src site jekyll build` | ||
2. output is in `./_site` here in this dir. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters