chore(deps): bump peter-evans/create-pull-request from 6 to 7 #6166
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
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- main # Set a branch name to trigger deployment | |
paths: | |
- docs/** | |
- src/analytics/private/sqls/** | |
- .github/workflows/ghpage.yml | |
pull_request: | |
merge_group: {} | |
jobs: | |
pages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Check non-ascii characters | |
run: | | |
set -uxo pipefail | |
nonAsciiLine=$(grep --color='auto' -r -P -n "[^\x00-\x7F]" ./docs/en | wc -l || true) | |
if [ $nonAsciiLine -gt 0 ]; then | |
echo "Non-ascii characters found in ./docs/en" | |
grep --color='auto' -r -P -n "[^\x00-\x7F]" ./docs/en | |
exit 1 | |
else | |
echo "No non-ascii characters found in ./docs/en" | |
fi | |
- name: Install mkdocs and material theme | |
run: | | |
python3 -m pip install 'mkdocs<1.6' 'mkdocs-material<10,>9.4' 'mkdocs-include-markdown-plugin<7' 'mkdocs-macros-plugin<2' 'mkdocs-glightbox<1' mike # install mkdocs | |
- name: Build mkdocs | |
env: | |
LINK_EN: ${{ vars.LINK_EN }} | |
LINK_ZH: ${{ vars.LINK_ZH }} | |
run: | | |
mkdocs build -f ./docs/mkdocs.en.yml -s --site-dir ../docs/site/en | |
mkdocs build -f ./docs/mkdocs.zh.yml -s --site-dir ../docs/site/zh | |
- name: Publish doc - 1.2.x | |
if: ${{ github.ref == 'refs/heads/main' && ( vars.LATEST_VERSION == '1.2.x' || vars.PREVIEW_VERSION == '1.2.x' ) }} | |
env: | |
VERSION: 1.2.x | |
LINK_EN: ${{ vars.LINK_EN }} | |
LINK_ZH: ${{ vars.LINK_ZH }} | |
run: | | |
set -euxo pipefail | |
git fetch origin gh-pages --depth=1 | |
git config user.name clickstream-ci-bot | |
git config user.email clickstream-ci-bot@amazon.com | |
ALIAS=$( [ "$VERSION" == "${{ vars.LATEST_VERSION }}" ] && echo "latest" || echo "" ) | |
ALIAS=$( [ "$VERSION" == "${{ vars.DEV_VERSION }}" ] && echo "dev" || echo "$ALIAS" ) | |
ALIAS=$( [ "$VERSION" == "${{ vars.PREVIEW_VERSION }}" ] && echo "preview" || echo "$ALIAS" ) | |
TITLE=$( [ "$ALIAS" == "latest" || "$ALIAS" == "" ] && echo "$VERSION" || echo "$VERSION ($ALIAS)" ) | |
LINK_EN=$LINK_EN$VERSION | |
LINK_ZH=$LINK_ZH$VERSION | |
mike deploy --push --update-aliases $VERSION ${ALIAS} -t "$TITLE" --deploy-prefix en/ -F ./docs/mkdocs.en.yml | |
mike deploy --push --update-aliases $VERSION ${ALIAS} -t "$TITLE" --deploy-prefix zh/ -F ./docs/mkdocs.zh.yml |