Skip to content

Commit 6e66e8a

Browse files
committed
Moved the GitHub pages workflow to a separate workflow.
1 parent c42c930 commit 6e66e8a

File tree

3 files changed

+40
-32
lines changed

3 files changed

+40
-32
lines changed

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
ARTIFACT: "webHelpDHUB2-all.zip"
12-
DOCKER_VERSION: "241.18775"
12+
DOCKER_VERSION: "243.21565"
1313
INSTANCE: "Writerside/dhub"
1414

1515
permissions:

.github/workflows/preview-deploy.yml

-31
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,8 @@ env:
1414

1515
permissions:
1616
contents: write
17-
pages: write
1817
id-token: write
1918

20-
concurrency:
21-
group: "pages"
22-
cancel-in-progress: false
23-
2419
jobs:
2520
build:
2621
runs-on: ubuntu-latest
@@ -109,29 +104,3 @@ jobs:
109104
git add .
110105
git commit -am "Automatic deployment"
111106
git push --force origin preview-deployment
112-
113-
pages:
114-
needs: deploy
115-
runs-on: ubuntu-latest
116-
117-
environment:
118-
name: github-pages
119-
url: ${{ steps.deployment.outputs.page_url }}
120-
121-
steps:
122-
- name: Checkout
123-
uses: actions/checkout@v4
124-
- name: Switch branch
125-
126-
run: |
127-
git checkout --orphan preview-deployment
128-
- name: Setup Pages
129-
uses: actions/configure-pages@v5
130-
- name: Upload artifact
131-
uses: actions/upload-pages-artifact@v3
132-
with:
133-
# Upload entire repository
134-
path: '.'
135-
- name: Deploy to GitHub Pages
136-
id: deployment
137-
uses: actions/deploy-pages@v4

.github/workflows/static.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Deploy GitHub Pages for Preview"
2+
3+
on:
4+
push:
5+
branches:
6+
- "preview-deployment"
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
deploy:
21+
runs-on: ubuntu-latest
22+
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v5
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
# Upload entire repository
36+
path: '.'
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)