Skip to content

Commit 15e9189

Browse files
committed
ci: switch to actions
1 parent 2e63c98 commit 15e9189

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

.github/workflows/docs.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,45 @@
11
name: Docs
2+
23
on:
34
push:
4-
branches: [main]
5+
branches: ["main"]
6+
workflow_dispatch:
57

68
permissions:
7-
contents: write
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
816

917
jobs:
10-
build-docs:
11-
concurrency: ci-${{ github.ref }}
18+
deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
1222
runs-on: ubuntu-latest
1323
steps:
14-
- name: Checkout 🛎️
15-
uses: actions/checkout@v3
16-
17-
- name: Node
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- name: Set up Node
1827
uses: actions/setup-node@v4
1928
with:
20-
node-version: "20"
21-
29+
node-version: 20
2230
- uses: pnpm/action-setup@v4
2331
with:
2432
version: 9.9.0
25-
26-
- name: Install and Build
27-
run: |
28-
pnpm i --frozen-lockfile
29-
BASE_URL='https://preachjs.github.io/' pnpm build
30-
31-
- name: Deploy 🚀
32-
uses: JamesIves/github-pages-deploy-action@v4
33+
- name: Install dependencies
34+
run: pnpm i --frozen-lockfile
35+
- name: Build
36+
run: pnpm build
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
3341
with:
34-
branch: gh-pages
35-
folder: dist
42+
path: "./dist"
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)