Skip to content

Commit

Permalink
CLDR-15464 build: post maint branches and releases to smoketest (#2355)
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 authored Sep 15, 2022
1 parent f338ce1 commit c38a4c6
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ on:
push:
branches:
- main
- "maint/maint-*"
tags:
- "release-*"
# Only run if docs change.
paths:
- "tools/scripts/tr-archive/**"
- "docs/**"
- '.github/workflows/gh-pages.yml'

## TODO CLDR-15464 reenable this!!
# paths:
# - "tools/scripts/tr-archive/**"
# - "docs/**"
# - '.github/workflows/gh-pages.yml'
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -36,23 +39,18 @@ jobs:
run: npx markdownlint-cli *.md {specs,docs}/*.md $(find .github -name '*.md') || (echo Warning, please fix these ; true)
- name: Note any changes
run: git status ; git diff
- name: Ruby cache
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/vendor
key: ${{ runner.os }}-gems-${{ hashFiles('docs/**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Build Jekyll part of the site
run: |
gem install bundler github-pages kramdown-parser-gfm # should pull in jekyll, etc.
jekyll build -s docs -d _site
- 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
- name: Deploy to GitHub Pages (main)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -63,5 +61,23 @@ jobs:
# cname: domain.tld # optional
# jekyll: no # optional
commit_message: CLDR-00000 Automated Build of Pages # optional
- name: Deploy to Smoketest
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})
# zero change

0 comments on commit c38a4c6

Please sign in to comment.