Skip to content

Commit

Permalink
update gh pages upload
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Jul 22, 2024
1 parent 7b8cfdc commit 1137530
Showing 1 changed file with 46 additions and 31 deletions.
77 changes: 46 additions & 31 deletions .github/workflows/build-openidfed4wallet.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,66 @@
name: OIDFED4WALLET document push
name: gh-pages

on:
# Runs on pushes targeting the default branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- .gitignore
branches: ["*"]
release:
types:
- created
- edited

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
compile-oid4vc:
compile-oidfed4wa:
name: Compile site assets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Create html folder
run: mkdir html

- name: Show folders
run: ls -al

- name: Show branch name
run: echo "$BRANCH_NAME"

- name: Run the build process with Docker
run: |
docker run \
-v /${{ github.workspace }}:/data danielfett/markdown2rfc \
openid-federation-4-wallet-architectures-1_0.md
- name: rename
run: |
mv ./openid-federation-4-wallet-architectures-1_0*.html ./openid-federation-4-wallet-architectures-wg-draft.html
- uses: actions/upload-artifact@v3
with:
# Artifact name
name: output # optional
# Destination path
path: ./openid-federation-4-wallet-architectures*.html # optional
mv ./openid-federation-4-wallet-architectures-1_0*.html ./html/openid-federation-4-wallet-architectures-wg-$BRANCH_NAME.html
publish-to-pages:
name: Publish to GitHub Pages
if: github.ref == 'refs/heads/main'
needs: compile-oid4vc
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: output
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: html
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1137530

Please sign in to comment.