New Authorization Design Patterns document #49
Workflow file for this run
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: publish | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-rfc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
with: | |
ruby-version: '3.1' | |
- 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 to rfc xml | |
run: kramdown-rfc2629 api/authorization-api-1_0.md > api/authorization-api-1_0.xml | |
- name: Render HTML | |
run: xml2rfc api/authorization-api-1_0.xml --html -o index.html | |
- name: Render Text | |
run: xml2rfc api/authorization-api-1_0.xml --text | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: output | |
path: | | |
index.html | |
api/authorization-api-1_0.xml | |
publish-to-pages: | |
if: github.ref == 'refs/heads/main' | |
needs: [build-rfc] | |
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 |