Skip to content

Commit b16c229

Browse files
authored
Update build.yml
1 parent 1586bd0 commit b16c229

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/build.yml

+8-17
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@ name: Build documentation
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- '*'
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
89
workflow_dispatch:
910

1011
permissions:
1112
id-token: write
1213
pages: write
1314

1415
env:
16+
# Name of module and id separated by a slash
1517
INSTANCE: Writerside/LewMCWiki
18+
# Replace XX with the ID of the instance in capital letters
1619
ARTIFACT: webHelpLEWMCWIKI2-all.zip
20+
# Docker image version
1721
DOCKER_VERSION: 241.15989
1822

1923
jobs:
@@ -45,6 +49,7 @@ jobs:
4549
environment:
4650
name: github-pages
4751
url: ${{ steps.deployment.outputs.page_url }}
52+
# Requires build job results
4853
needs: build
4954
runs-on: ubuntu-latest
5055

@@ -60,16 +65,6 @@ jobs:
6065
- name: Setup Pages
6166
uses: actions/[email protected]
6267

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-
7368
- name: Upload artifact
7469
uses: actions/[email protected]
7570
with:
@@ -78,7 +73,3 @@ jobs:
7873
- name: Deploy to GitHub Pages
7974
id: deployment
8075
uses: actions/[email protected]
81-
with:
82-
target_branch: gh-pages
83-
target_path: ${{ env.DEPLOY_PATH }}
84-

0 commit comments

Comments
 (0)