Skip to content

Commit 33cd3e9

Browse files
authored
Use auto-deploy rather than separate branch (#1510)
1 parent 6d9526d commit 33cd3e9

1 file changed

Lines changed: 24 additions & 19 deletions

File tree

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,42 @@
1-
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Build Examples
1+
name: Deploy Examples to GitHub Pages
52

63
on:
74
push:
85
branches: [ master ]
96

10-
jobs:
11-
build:
12-
13-
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
1411

15-
strategy:
16-
matrix:
17-
node-version: [20.x]
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: true
1815

16+
jobs:
17+
deploy:
18+
environment:
19+
name: github-pages
20+
url: ${{ steps.deployment.outputs.page_url }}
21+
runs-on: ubuntu-latest
1922
steps:
20-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2124

22-
- name: Use Node.js ${{ matrix.node-version }}
25+
- name: Setup Node.js
2326
uses: actions/setup-node@v4
2427
with:
25-
node-version: ${{ matrix.node-version }}
28+
node-version: 22.x
2629
cache: 'npm'
2730
- run: npm ci --prefer-offline
2831
- run: npm run build-examples
2932
env:
3033
VITE_ION_KEY: ${{ secrets.VITE_ION_KEY }}
3134

32-
- name: Commit Examples
33-
uses: EndBug/add-and-commit@v7
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
3437
with:
35-
add: 'example/bundle'
36-
message: 'update builds'
37-
push: 'origin HEAD:examples --force'
38+
path: ./example/bundle
39+
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)