Improve footer accessibility and color contrast using brand colors #58
Workflow file for this run
This file contains hidden or 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: Build and Commit Dist Files On Merge | |
| on: | |
| pull_request: | |
| types: [synchronize, opened, reopened] | |
| paths-ignore: | |
| - 'dist/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: build-dist-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| if: >- | |
| github.actor != 'github-actions[bot]' && | |
| ( | |
| github.event_name != 'workflow_dispatch' || | |
| !contains(fromJson('["main","master"]'), github.ref_name) | |
| ) && | |
| ( | |
| github.event_name != 'pull_request' || | |
| github.event.pull_request.head.repo.full_name == github.repository | |
| ) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref || github.ref }} | |
| fetch-depth: 2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build project | |
| run: yarn build | |
| - name: Commit dist changes (amend) | |
| shell: bash | |
| env: | |
| TARGET_BRANCH: ${{ github.head_ref || github.ref_name }} | |
| run: | | |
| set -euo pipefail | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| if [[ -z "$(git status --porcelain dist)" ]]; then | |
| echo "No dist/ changes to commit." | |
| exit 0 | |
| fi | |
| git add -A dist | |
| if git diff --cached --quiet; then | |
| echo "No staged dist/ changes after add." | |
| exit 0 | |
| fi | |
| git commit --amend --no-edit | |
| echo "Pushing amended commit to $TARGET_BRANCH" | |
| git fetch origin "$TARGET_BRANCH" --depth=2 | |
| git push --force-with-lease origin "HEAD:$TARGET_BRANCH" |