File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 uses : JS-DevTools/npm-publish@v3
3434 with :
3535 token : ${{ secrets.NPM_TOKEN }}
36+
37+ deploy-example :
38+ runs-on : ubuntu-latest
39+ needs : publish
40+ if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
41+ steps :
42+ - uses : actions/checkout@v4
43+ - name : Use Node.js 20.x
44+ uses : actions/setup-node@v4
45+ with :
46+ node-version : 20.x
47+ - name : Cache node_modules
48+ uses : actions/cache@v4
49+ with :
50+ path : example/node_modules
51+ key : ${{ runner.os }}-yarn-example-${{ hashFiles('example/yarn.lock') }}
52+ restore-keys : |
53+ ${{ runner.os }}-yarn-example-
54+ - name : Install dependencies (example)
55+ run : cd example && yarn install --frozen-lockfile
56+ - name : Build example app
57+ run : cd example && yarn build
58+ - name : Deploy to GitHub Pages
59+ uses : peaceiris/actions-gh-pages@v4
60+ with :
61+ github_token : ${{ secrets.GITHUB_TOKEN }}
62+ publish_dir : ./example/build
63+ publish_branch : gh-pages
64+ user_name : github-actions[bot]
65+ user_email : github-actions[bot]@users.noreply.github.com
You can’t perform that action at this time.
0 commit comments