mirror of
https://github.com/boostorg/boostlook.git
synced 2026-01-19 04:02:14 +00:00
73 lines
2.2 KiB
YAML
73 lines
2.2 KiB
YAML
name: Sync boostlook.css to website-v2 & website-v2-docs
|
|
|
|
on:
|
|
push:
|
|
branches: ["develop"]
|
|
paths:
|
|
- "boostlook.css"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
update-css:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'boostorg/boostlook'
|
|
steps:
|
|
- name: Checkout current repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Checkout website-v2 repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: boostorg/website-v2
|
|
ref: develop
|
|
path: website-v2
|
|
token: ${{ secrets.WEBSITE_V2_PAT }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Copy boostlook.css to website-v2
|
|
run: |
|
|
cp -v boostlook.css website-v2/static/css/boostlook.css
|
|
- name: Install pre-commit
|
|
if: success()
|
|
run: |
|
|
pip install pre-commit
|
|
- name: Run pre-commit hooks on boostlook.css
|
|
if: success()
|
|
working-directory: website-v2
|
|
run: |
|
|
pre-commit run --files static/css/boostlook.css
|
|
- name: Commit and push changes to develop branch
|
|
if: success()
|
|
working-directory: website-v2
|
|
env:
|
|
GH_TOKEN: ${{ secrets.WEBSITE_V2_PAT }}
|
|
run: |
|
|
git config user.name "${{ github.actor }}"
|
|
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
|
git add static/css/boostlook.css
|
|
if ! git diff-index --quiet HEAD; then
|
|
git commit -m "chore: Update boostlook.css from boostlook repository"
|
|
git push origin develop
|
|
else
|
|
echo "No changes to commit. Skipping commit to develop."
|
|
fi
|
|
- name: Trigger website-v2-docs ui-release workflow
|
|
if: success()
|
|
env:
|
|
GH_TOKEN: ${{ secrets.WEBSITE_V2_PAT }}
|
|
run: |
|
|
gh workflow run ui-release.yml --repo boostorg/website-v2-docs --ref develop
|
|
- name: Trigger website-v2-docs publish workflow
|
|
if: success()
|
|
env:
|
|
GH_TOKEN: ${{ secrets.WEBSITE_V2_PAT }}
|
|
run: |
|
|
gh workflow run publish.yml --repo boostorg/website-v2-docs --ref develop
|