|
1 |
| -name: OIDFED4WALLET document push |
| 1 | +name: gh-pages |
| 2 | + |
2 | 3 | on:
|
| 4 | + # Runs on pushes targeting the default branch |
3 | 5 | 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 |
7 | 30 |
|
8 | 31 | jobs:
|
9 |
| - compile-oid4vc: |
| 32 | + compile-oidfed4wa: |
10 | 33 | name: Compile site assets
|
11 | 34 | runs-on: ubuntu-latest
|
12 | 35 | steps:
|
13 | 36 | - 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 | + |
14 | 47 | - name: Run the build process with Docker
|
15 | 48 | run: |
|
16 | 49 | docker run \
|
17 | 50 | -v /${{ github.workspace }}:/data danielfett/markdown2rfc \
|
18 | 51 | openid-federation-4-wallet-architectures-1_0.md
|
19 | 52 | - name: rename
|
20 | 53 | 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 |
28 | 55 |
|
29 | 56 | publish-to-pages:
|
30 | 57 | name: Publish to GitHub Pages
|
31 |
| - if: github.ref == 'refs/heads/main' |
32 | 58 | needs: compile-oid4vc
|
33 | 59 | 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