added initial specification (#1) #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gh-pages | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
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: | |
build-and-deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Show env | |
run: echo "$GITHUB_CONTEXT" | |
- 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 `pwd`:/data danielfett/markdown2rfc openid-federation-extended-listing-1_0.md | |
- name: rename | |
run: | | |
mv ./openid-federation-extended-listing*.html ./html/$BRANCH_NAME.html | |
- name: Deploy to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: html | |
keep_history: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |