Skip to content

Commit e0b23cc

Browse files
committed
ci: refactor GitHub Actions workflow by commenting out existing steps for clarity
1 parent dbf979c commit e0b23cc

1 file changed

Lines changed: 56 additions & 56 deletions

File tree

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
name: Build and Commit
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
10-
workflow_dispatch:
11-
12-
permissions:
13-
contents: write # Required for committing changes
14-
15-
jobs:
16-
build-and-commit:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v4
21-
with:
22-
fetch-depth: 0 # Fetch all history for proper versioning
23-
ref: ${{ github.event.pull_request.head.sha || github.sha }}
24-
25-
- name: Setup Node.js
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: '20'
29-
cache: 'yarn'
30-
31-
- name: Install dependencies
32-
run: yarn install
33-
34-
- name: Build package
35-
run: yarn prepare
36-
37-
- name: Configure Git
38-
run: |
39-
git config --global user.name 'GitHub Actions'
40-
git config --global user.email 'github-actions@github.com'
41-
42-
- name: Commit build results
43-
run: |
44-
git add build/ -f
45-
if git diff --quiet && git diff --staged --quiet; then
46-
echo "No changes to commit"
47-
exit 0
48-
fi
49-
50-
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
51-
git commit -m "chore: update build files [skip ci]"
52-
git push origin HEAD:refs/heads/${{ github.head_ref }}
53-
else
54-
git commit -m "chore: update build files [skip ci]"
55-
git push origin HEAD:refs/heads/${{ github.ref_name }}
56-
fi
1+
# name: Build and Commit
2+
3+
# on:
4+
# push:
5+
# branches:
6+
# - main
7+
# pull_request:
8+
# branches:
9+
# - main
10+
# workflow_dispatch:
11+
12+
# permissions:
13+
# contents: write # Required for committing changes
14+
15+
# jobs:
16+
# build-and-commit:
17+
# runs-on: ubuntu-latest
18+
# steps:
19+
# - name: Checkout
20+
# uses: actions/checkout@v4
21+
# with:
22+
# fetch-depth: 0 # Fetch all history for proper versioning
23+
# ref: ${{ github.event.pull_request.head.sha || github.sha }}
24+
25+
# - name: Setup Node.js
26+
# uses: actions/setup-node@v4
27+
# with:
28+
# node-version: '20'
29+
# cache: 'yarn'
30+
31+
# - name: Install dependencies
32+
# run: yarn install
33+
34+
# - name: Build package
35+
# run: yarn prepare
36+
37+
# - name: Configure Git
38+
# run: |
39+
# git config --global user.name 'GitHub Actions'
40+
# git config --global user.email 'github-actions@github.com'
41+
42+
# - name: Commit build results
43+
# run: |
44+
# git add build/ -f
45+
# if git diff --quiet && git diff --staged --quiet; then
46+
# echo "No changes to commit"
47+
# exit 0
48+
# fi
49+
50+
# if [[ "${{ github.event_name }}" == "pull_request" ]]; then
51+
# git commit -m "chore: update build files [skip ci]"
52+
# git push origin HEAD:refs/heads/${{ github.head_ref }}
53+
# else
54+
# git commit -m "chore: update build files [skip ci]"
55+
# git push origin HEAD:refs/heads/${{ github.ref_name }}
56+
# fi

0 commit comments

Comments
 (0)