spec-up-t 1.1.17 → 1.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-up-t",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
5
5
  "main": "./index",
6
6
  "repository": {
@@ -0,0 +1,53 @@
1
+ name: Set GitHub Pages
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ username:
7
+ description: 'Your GitHub username (optional, defaults to repository owner)'
8
+ required: false
9
+
10
+ jobs:
11
+ configure-pages:
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read # To check branches
15
+ pages: write # To configure Pages settings
16
+ steps:
17
+ - name: Determine repository owner
18
+ id: get-owner
19
+ run: |
20
+ OWNER="${{ github.event.inputs.username }}"
21
+ if [ -z "$OWNER" ]; then
22
+ OWNER="${{ github.repository_owner }}"
23
+ fi
24
+ echo "OWNER=$OWNER" >> $GITHUB_ENV
25
+
26
+ - name: Check if gh-pages branch exists
27
+ id: check-branch
28
+ run: |
29
+ RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
30
+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
31
+ -H "Accept: application/vnd.github+json" \
32
+ https://api.github.com/repos/${{ env.OWNER }}/${{ github.repository }}/branches/gh-pages)
33
+ if [ "$RESPONSE" -eq 200 ]; then
34
+ echo "gh-pages branch exists"
35
+ echo "BRANCH_EXISTS=true" >> $GITHUB_ENV
36
+ elif [ "$RESPONSE" -eq 404 ]; then
37
+ echo "Error: gh-pages branch does not exist in ${{ env.OWNER }}/${{ github.repository }}"
38
+ exit 1
39
+ else
40
+ echo "Unexpected response code: $RESPONSE"
41
+ exit 1
42
+ fi
43
+
44
+ - name: Set GitHub Pages to gh-pages
45
+ if: env.BRANCH_EXISTS == 'true'
46
+ run: |
47
+ curl -L \
48
+ -X POST \
49
+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
50
+ -H "Accept: application/vnd.github+json" \
51
+ https://api.github.com/repos/${{ env.OWNER }}/${{ github.repository }}/pages \
52
+ -d '{"source":{"branch":"gh-pages","path":"/"}}'
53
+ echo "GitHub Pages set to gh-pages branch for ${{ env.OWNER }}/${{ github.repository }}"