Skip to content

Commit 5a36271

Browse files
testing adjusted workflow
1 parent f5b6334 commit 5a36271

File tree

1 file changed

+52
-19
lines changed

1 file changed

+52
-19
lines changed

.github/workflows/main.yml

+52-19
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,61 @@ permissions:
1515
jobs:
1616
build:
1717
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 9
26+
27+
- name: Install dependencies
28+
run: pnpm install
1829

30+
- name: Build application
31+
run: pnpm build:docs
32+
33+
- name: Save build folder
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: build
37+
if-no-files-found: error
38+
path: ./docs
39+
40+
deploy:
41+
runs-on: ubuntu-latest
42+
needs: build
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
1946
strategy:
2047
matrix:
2148
node-version: [20]
2249

2350
steps:
24-
- uses: actions/checkout@v3
25-
26-
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
28-
with:
29-
node-version: ${{ matrix.node-version }}
30-
31-
- name: Build
32-
run: |
33-
git config --global user.email "[email protected]"
34-
git config --global user.name "WebDevNerdStuff"
35-
mkdir docs
36-
npm install --g gh-pages
37-
npm i
38-
npm run build:docs
39-
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
40-
npm run deploy -u "github-actions-bot <[email protected]>"
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
- name: Setup pnpm
52+
uses: pnpm/action-setup@v4
53+
with:
54+
version: 9
55+
56+
- name: Checkout
57+
uses: actions/checkout@v4
58+
59+
- name: Download the build folder
60+
uses: actions/download-artifact@v4
61+
with:
62+
name: build
63+
path: ./docs
64+
65+
- name: Install dependencies
66+
run: pnpm install
67+
68+
- name: Use Node.js ${{ matrix.node-version }}
69+
uses: actions/setup-node@v3
70+
with:
71+
node-version: ${{ matrix.node-version }}
72+
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)