initial commit #1
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 | |
- '.github/**' | |
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@v3 | |
- 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: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install kramdown-rfc | |
run: gem install kramdown-rfc | |
- name: Install xml2rfc | |
run: pip install xml2rfc | |
- name: Convert md to xml | |
run: kramdown-rfc2629 openid-provider-commands-1_0.md > openid-provider-commands-1_0.xml | |
- name: Render HTML | |
run: xml2rfc openid-provider-commands-1_0.xml --html -o openid-provider-commands-1_0.html | |
- name: Render Text | |
run: xml2rfc openid-provider-commands-1_0.xml --text | |
- name: Deploy to GitHub Pages | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
target_branch: gh-pages | |
build_dir: html | |
keep_history: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |