diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index e22c37f367a..cb9285a103e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -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 @@ -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: diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml new file mode 100644 index 00000000000..43b69ed413c --- /dev/null +++ b/.github/workflows/site.yml @@ -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 diff --git a/tools/scripts/web/docker/Dockerfile b/tools/scripts/web/docker/Dockerfile index a409613ea2d..2517642543a 100644 --- a/tools/scripts/web/docker/Dockerfile +++ b/tools/scripts/web/docker/Dockerfile @@ -1,2 +1,2 @@ -FROM jekyll/jekyll +FROM jekyll/jekyll:4.2.2 RUN gem install bundler github-pages kramdown-parser-gfm webrick