88
99 steps :
1010 - uses : actions/checkout@v4
11- - uses : actions/setup-node@v3
12- with :
13- cache : yarn
14- node-version : 20
15- - run : yarn install --frozen-lockfile
11+ - uses : oven-sh/setup-bun@v1
12+
13+ - run : bun install --frozen-lockfile
1614
1715 - run : npm run type
1816 - run : npm run lint
19- - run : npm run test --ci
17+ - run : bun test
2018 env :
2119 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2220
4644 test -f dist/github-contribution-grid-snake-dark.svg
4745 test -f dist/github-contribution-grid-snake.gif
4846
49- - uses : crazy-max/ghaction-github-pages@v3 .1.0
47+ - uses : crazy-max/ghaction-github-pages@v4 .1.0
5048 with :
5149 target_branch : output
5250 build_dir : dist
5755 runs-on : ubuntu-latest
5856 steps :
5957 - uses : actions/checkout@v4
60- - uses : actions/setup-node@v3
61- with :
62- cache : yarn
63- node-version : 20
64- - run : yarn install --frozen-lockfile
58+ - uses : oven-sh/setup-bun@v1
59+
60+ - run : bun install --frozen-lockfile
6561
6662 - name : build svg-only action
6763 run : |
8480 test -f dist/github-contribution-grid-snake.svg
8581 test -f dist/github-contribution-grid-snake-dark.svg
8682
87- - uses : crazy-max/ghaction-github-pages@v3 .1.0
83+ - uses : crazy-max/ghaction-github-pages@v4 .1.0
8884 with :
8985 target_branch : output-svg-only
9086 build_dir : dist
@@ -93,22 +89,22 @@ jobs:
9389
9490 deploy-ghpages :
9591 runs-on : ubuntu-latest
92+ permissions :
93+ pages : write
94+ id-token : write
9695 steps :
9796 - uses : actions/checkout@v4
98- - uses : actions/setup-node@v3
99- with :
100- cache : yarn
101- node-version : 20
102- - run : yarn install --frozen-lockfile
97+ - uses : oven-sh/setup-bun@v1
98+
99+ - run : bun install --frozen-lockfile
103100
104101 - run : npm run build:demo
105102 env :
106103 GITHUB_USER_CONTRIBUTION_API_ENDPOINT : https://snk-one.vercel.app/api/github-user-contribution/
107104
108- -
uses :
crazy-max/[email protected] 109- if : success() && github.ref == 'refs/heads/main'
105+ - uses : actions/upload-pages-artifact@v3
110106 with :
111- target_branch : gh-pages
112- build_dir : packages/demo/dist
113- env :
114- GITHUB_TOKEN : ${{ secrets.MY_GITHUB_TOKEN_GH_PAGES }}
107+ path : packages/demo/dist
108+
109+ - uses : actions/deploy-pages@v4
110+ if : success() && github.ref == 'refs/heads/main'
0 commit comments