Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit 27837fc

Browse files
Have the deploy workflows use the build workflow file instead
1 parent 6b6f4b7 commit 27837fc

File tree

3 files changed

+11
-39
lines changed

3 files changed

+11
-39
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build
22
on:
33
workflow_dispatch:
4+
workflow_call:
45
pull_request:
56
jobs:
67
build:

.github/workflows/deploy.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,16 @@ on:
66
workflow_dispatch:
77
jobs:
88
build:
9-
name: Build and Deploy
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout Repository
13-
uses: actions/checkout@v2
14-
with:
15-
fetch-depth: '0'
16-
persist-credentials: false
17-
submodules: 'recursive'
18-
- name: Setup Node
19-
uses: actions/setup-node@v2-beta
20-
with:
21-
node-version: '22'
22-
- name: Build
23-
run: npm install && npm run build
24-
- name: Upload static files as artifact
25-
id: deployment
26-
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
27-
with:
28-
path: docs
9+
name: Build
10+
uses: ./.github/workflows/build.yml
2911
deploy:
30-
environment:
31-
name: Deploy
12+
name: Deploy
13+
runs-on: ubuntu-latest
14+
needs: build
3215
permissions:
3316
contents: read
3417
pages: write
3518
id-token: write
36-
runs-on: ubuntu-latest
37-
needs: build
3819
steps:
3920
- name: Deploy to GitHub Pages
4021
id: deployment

.github/workflows/deploy_legacy.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,12 @@ on:
33
workflow_dispatch:
44
jobs:
55
build:
6-
name: Build and Deploy
7-
runs-on: ubuntu-latest
6+
name: Build
7+
uses: ./.github/workflows/build.yml
8+
deploy:
9+
name: Deploy
810
steps:
9-
- name: Checkout Repository
10-
uses: actions/checkout@v2
11-
with:
12-
fetch-depth: '0'
13-
persist-credentials: false
14-
submodules: 'recursive'
15-
- name: Setup Node
16-
uses: actions/setup-node@v2-beta
17-
with:
18-
node-version: '22'
19-
- name: Build
20-
run: npm install && npm run build
21-
- name: Deploy
11+
- name: Deploy to GitHub Pages (gh-pages branch)
2212
uses: JamesIves/[email protected]
2313
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}}
2414
with:

0 commit comments

Comments
 (0)