@@ -2,22 +2,18 @@ name: Build documentation
2
2
3
3
on :
4
4
push :
5
- # To trigger the workflow once you push to the `main` branch
6
- # Replace `main` with your branch’s name
7
- branches : ["main"]
8
- # Specify to run a workflow manually from the Actions tab on GitHub
5
+ branches :
6
+ - main
7
+ - ' *'
9
8
workflow_dispatch :
10
9
11
10
permissions :
12
11
id-token : write
13
12
pages : write
14
13
15
14
env :
16
- # Name of module and id separated by a slash
17
15
INSTANCE : Writerside/LewMCWiki
18
- # Replace XX with the ID of the instance in capital letters
19
16
ARTIFACT : webHelpLEWMCWIKI2-all.zip
20
- # Docker image version
21
17
DOCKER_VERSION : 241.15989
22
18
23
19
jobs :
49
45
environment :
50
46
name : github-pages
51
47
url : ${{ steps.deployment.outputs.page_url }}
52
- # Requires build job results
53
48
needs : build
54
49
runs-on : ubuntu-latest
55
50
@@ -65,11 +60,22 @@ jobs:
65
60
- name : Setup Pages
66
61
67
62
68
- - name : Upload artifact
63
+ - name : Determine Deployment Path
64
+ id : deployment-path
65
+ run : |
66
+ if [ "${{ github.ref }}" = "refs/heads/main" ]; then
67
+ echo "DEPLOY_PATH=." >> $GITHUB_ENV
68
+ else
69
+ BRANCH_NAME=$(echo "${{ github.ref }}" | sed 's/refs\/heads\///')
70
+ echo "DEPLOY_PATH=${BRANCH_NAME}" >> $GITHUB_ENV
71
+ fi
72
+
73
+ - name : Upload artifact to Pages
69
74
70
75
with :
71
76
path : dir
77
+ deployment-path : ${{ env.DEPLOY_PATH }}
72
78
73
79
- name : Deploy to GitHub Pages
74
80
id : deployment
75
-
81
+
0 commit comments