File tree 2 files changed +43
-1
lines changed
2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : static
2
+
3
+ on :
4
+ push :
5
+ branches : ['master']
6
+ workflow_dispatch :
7
+
8
+ # Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages.
9
+ permissions :
10
+ contents : read
11
+ pages : write
12
+ id-token : write
13
+
14
+ concurrency :
15
+ group : pages
16
+ cancel-in-progress : true
17
+
18
+ jobs :
19
+ deploy :
20
+ environment :
21
+ name : github-pages
22
+ url : ${{ steps.deployment.outputs.page_url }}
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - name : Checkout
26
+ uses : actions/checkout@v4
27
+ - name : Setup Pages
28
+ uses : actions/configure-pages@v5
29
+ - name : Generate coverage and badge
30
+ run : |
31
+ ./ci/test.sh
32
+ mkdir -p ./ci/out/static
33
+ cp ./ci/out/coverage.html ./ci/out/static/coverage.html
34
+ percent=$(go tool cover -func ./ci/out/coverage.prof | tail -n1 | awk '{print $3}' | tr -d '%')
35
+ wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${percent}%25-success"
36
+ - name : Upload artifact
37
+ uses : actions/upload-pages-artifact@v3
38
+ with :
39
+ path : ./ci/out/static/
40
+ - name : Deploy to GitHub Pages
41
+ id : deployment
42
+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1
1
# websocket
2
2
3
3
[ ![ Go Reference] ( https://pkg.go.dev/badge/github.com/coder/websocket.svg )] ( https://pkg.go.dev/github.com/coder/websocket )
4
- [ ![ Go Coverage] ( https://img.shields .io/badge /coverage-91%25-success )] ( https://github.com/coder /websocket/coverage.html )
4
+ [ ![ Go Coverage] ( https://coder.github .io/websocket /coverage.svg )] ( https://coder. github.io /websocket/coverage.html )
5
5
6
6
websocket is a minimal and idiomatic WebSocket library for Go.
7
7
You can’t perform that action at this time.
0 commit comments