File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Test Documentation Generation
22
33on :
4+ pull_request :
5+ branches :
6+ - this-branch-does-not-exist-so-trigger-never-fires
7+
48 workflow_dispatch :
59 inputs :
610 branch_type :
1216 - main
1317 - release/v1
1418 - release/v2
15- pull_request :
16- branches :
17- - main
1819
1920permissions :
2021 contents : read
2728 environment :
2829 name : github-pages-test
2930 url : ${{ steps.deployment.outputs.page_url }}
30-
31+
3132 steps :
3233 - name : Check out code
3334 uses : actions/checkout@v4
@@ -40,25 +41,14 @@ jobs:
4041 - name : Install dependencies
4142 run : npm ci
4243
43- - name : Set branch type based on trigger
44- id : set-branch
45- run : |
46- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
47- echo "BRANCH_TYPE=${{ github.event.inputs.branch_type }}" >> $GITHUB_ENV
48- else
49- echo "BRANCH_TYPE=main" >> $GITHUB_ENV
50- fi
51- echo "VERSION=1.2.3" >> $GITHUB_ENV
52-
5344 - name : Generate documentation
5445 run : |
55- mkdir -p .github/scripts/docs
56- bash .github/scripts/docs/generate-and-publish-docs.sh "$BRANCH_TYPE" "$VERSION"
57-
46+ bash .github/scripts/docs/generate-and-publish-docs.sh "${{ github.event.inputs.branch_type }}" "1.2.3"
47+
5848 # Move to Jekyll expected structure
5949 mkdir -p _site
6050 cp -r docs-site/* _site/
61-
51+
6252 # Create .nojekyll file to bypass Jekyll processing
6353 touch _site/.nojekyll
6454
6959 uses : actions/upload-pages-artifact@v3
7060 with :
7161 path : ' _site'
72-
62+
7363 - name : Deploy to GitHub Pages
7464 id : deployment
7565 uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments