Skip to content

Commit a33d630

Browse files
committed
refactor: optimize disk space management in production workflow
- Removed redundant disk usage checks and consolidated cleanup commands into a single run step to streamline the production workflow. - Enhanced disk space management by directly removing unnecessary directories and pruning Docker images, improving build efficiency.
1 parent 74062cd commit a33d630

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/production.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,16 @@ jobs:
3636
runs-on: ubuntu-latest
3737
name: Build website
3838
steps:
39-
- name: Check disk usage
40-
run: df -h
41-
4239
- name: Maximize build space
43-
uses: easimon/maximize-build-space@master
44-
with:
45-
root-reserve-mb: 512
46-
swap-size-mb: 1024
47-
remove-dotnet: 'true'
48-
49-
- name: Check disk usage
50-
run: df -h
40+
run: |
41+
df -h
42+
sudo rm -rf /usr/share/dotnet
43+
sudo rm -rf /usr/local/lib/android
44+
sudo rm -rf /opt/ghc
45+
sudo rm -rf /opt/hostedtoolcache/CodeQL
46+
sudo docker image prune --all --force
47+
sudo docker builder prune -a
48+
df -h
5149
5250
- uses: actions/checkout@v3
5351
with:

0 commit comments

Comments
 (0)