Skip to content

Commit 1137530

Browse files
committed
update gh pages upload
1 parent 7b8cfdc commit 1137530

File tree

1 file changed

+46
-31
lines changed

1 file changed

+46
-31
lines changed
Lines changed: 46 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,66 @@
1-
name: OIDFED4WALLET document push
1+
name: gh-pages
2+
23
on:
4+
# Runs on pushes targeting the default branch
35
push:
4-
branches: [ main ]
5-
pull_request:
6-
branches: [ main ]
6+
paths-ignore:
7+
- README.md
8+
- CONTRIBUTING.md
9+
- LICENSE.md
10+
- .gitignore
11+
branches: ["*"]
12+
release:
13+
types:
14+
- created
15+
- edited
16+
17+
# Allows you to run this workflow manually from the Actions tab
18+
workflow_dispatch:
19+
20+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
21+
permissions:
22+
contents: write
23+
pages: write
24+
id-token: write
25+
26+
# Allow one concurrent deployment
27+
concurrency:
28+
group: "pages"
29+
cancel-in-progress: true
730

831
jobs:
9-
compile-oid4vc:
32+
compile-oidfed4wa:
1033
name: Compile site assets
1134
runs-on: ubuntu-latest
1235
steps:
1336
- uses: actions/checkout@v3
37+
38+
- name: Create html folder
39+
run: mkdir html
40+
41+
- name: Show folders
42+
run: ls -al
43+
44+
- name: Show branch name
45+
run: echo "$BRANCH_NAME"
46+
1447
- name: Run the build process with Docker
1548
run: |
1649
docker run \
1750
-v /${{ github.workspace }}:/data danielfett/markdown2rfc \
1851
openid-federation-4-wallet-architectures-1_0.md
1952
- name: rename
2053
run: |
21-
mv ./openid-federation-4-wallet-architectures-1_0*.html ./openid-federation-4-wallet-architectures-wg-draft.html
22-
- uses: actions/upload-artifact@v3
23-
with:
24-
# Artifact name
25-
name: output # optional
26-
# Destination path
27-
path: ./openid-federation-4-wallet-architectures*.html # optional
54+
mv ./openid-federation-4-wallet-architectures-1_0*.html ./html/openid-federation-4-wallet-architectures-wg-$BRANCH_NAME.html
2855
2956
publish-to-pages:
3057
name: Publish to GitHub Pages
31-
if: github.ref == 'refs/heads/main'
3258
needs: compile-oid4vc
3359
runs-on: ubuntu-latest
34-
permissions:
35-
pages: write
36-
id-token: write
37-
environment:
38-
name: github-pages
39-
url: ${{ steps.deployment.outputs.page_url }}
40-
steps:
41-
- name: Download artifact
42-
uses: actions/download-artifact@v2
43-
with:
44-
name: output
45-
- name: Upload pages artifact
46-
uses: actions/upload-pages-artifact@v1
47-
with:
48-
path: .
49-
- name: Deploy to GitHub Pages
50-
id: deployment
51-
uses: actions/deploy-pages@v2
60+
uses: crazy-max/ghaction-github-pages@v2
61+
with:
62+
target_branch: gh-pages
63+
build_dir: html
64+
keep_history: true
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)