Skip to content

Commit 02b48c3

Browse files
committed
Upgrade github actions and format shell output
1 parent 5121fc1 commit 02b48c3

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/static.yml

+15-10
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,18 @@ jobs:
4040
steps:
4141
- name: My Host
4242
run: |
43-
echo -e "free -h:\n`free -h`"
43+
sudo apt install -y moreutils # https://unix.stackexchange.com/questions/26728/prepending-a-timestamp-to-each-line-of-output-from-a-command
44+
echo -e "free -h:\n`free -h`" | ts
45+
echo
4446
sudo rm -rf /usr/local/lib/android # release about 12 GB, cost 1min
4547
sudo rm -rf /usr/share/dotnet # release about 1 GB, cost 2s
46-
echo -e "df -h:\n`df -h`"
47-
echo "pwd: `pwd`"
48-
echo "nproc: `nproc`"
49-
echo -e "curl -s ifconfig.me/all:\n`curl -s ifconfig.me/all`"
48+
echo -e "df -h:\n`df -h`" | ts
49+
echo
50+
echo "pwd: `pwd`" | ts
51+
echo
52+
echo "nproc: `nproc`" | ts
53+
echo
54+
echo -e "curl -s ifconfig.me/all:\n`curl -s ifconfig.me/all`" | ts
5055
5156
- name: Export vars to env
5257
env:
@@ -88,7 +93,7 @@ jobs:
8893
run: pip install --upgrade -r requirements.txt
8994

9095
- name: Download Page Artifact
91-
uses: dawidd6/action-download-artifact@v2
96+
uses: dawidd6/action-download-artifact@v3
9297
with:
9398
name: 'github-pages'
9499
path: 'output'
@@ -133,21 +138,21 @@ jobs:
133138
COZE_BOT_ID: ${{ secrets.COZE_BOT_ID }}
134139

135140
- name: Setup Pages
136-
uses: actions/configure-pages@v2
141+
uses: actions/configure-pages@v4
137142

138143
- name: Upload Page Artifact
139-
uses: actions/upload-pages-artifact@v2
144+
uses: actions/upload-pages-artifact@v3
140145
with:
141146
path: 'output'
142147
retention-days: 7
143148

144149
- name: Deploy to GitHub Pages
145150
id: deployment
146-
uses: actions/deploy-pages@v2
151+
uses: actions/deploy-pages@v4
147152
if: ${{ success() }}
148153

149154
- name: Deploy to Cloudflare Pages
150-
uses: cloudflare/pages-action@1
155+
uses: cloudflare/pages-action@v1
151156
continue-on-error: true # tolerate cloudflare api failure
152157
if: ${{ success() }}
153158
with:

0 commit comments

Comments
 (0)