Skip to content

Commit

Permalink
CLDR-17803 docs/site: give up on docker for GH, split out site.yml wo…
Browse files Browse the repository at this point in the history
…rkflow
  • Loading branch information
srl295 committed Aug 27, 2024
1 parent 7767be4 commit ce4c58a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

name: Publish to cloudflare / gh-pages
name: gh-pages

# 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
Expand All @@ -26,21 +28,6 @@ on:
- "docs/**"
- '.github/workflows/gh-pages.yml'
jobs:
cloudflare:
runs-on: ubuntu-latest
environment: cloudflare
steps:
- uses: actions/checkout@v4
with:
lfs: false
- name: Build cldr.pages.dev
run: 'cd tools/scripts/web/docker && docker compose run -w /src site jekyll build'
- name: Deploy cldr.pages.dev
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy tools/scripts/web/docker/_site --project-name=cldr
build:
runs-on: ubuntu-latest
steps:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: site

permissions:
pages: write
deployments: write
id-token: write

on:
pull_request:
paths:
- "tools/scripts/tr-archive/**"
- "docs/**"
- '.github/workflows/gh-pages.yml'
push:
branches:
- main
- "maint/maint-*"
tags:
- "release-*"
# Only run if docs change.
paths:
- "tools/scripts/tr-archive/**"
- "docs/**"
- '.github/workflows/gh-pages.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: Deploy cldr.pages.dev
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./_site --project-name=cldr
2 changes: 1 addition & 1 deletion tools/scripts/web/docker/Dockerfile
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

0 comments on commit ce4c58a

Please sign in to comment.