Skip to content

chore: open-source readiness fixes (#184) #121

chore: open-source readiness fixes (#184)

chore: open-source readiness fixes (#184) #121

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: deploy
cancel-in-progress: true
jobs:
build-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
load: true
tags: ietf-spec-tools:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Generate artifacts
run: |
mkdir -p .cache
docker run --rm --user $(id -u):$(id -g) -e HOME=/data -v ${{ github.workspace }}:/data ietf-spec-tools:latest /data/scripts/gen.sh
- name: Upload bundle
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ietf-specs-${{ github.sha }}
path: artifacts/
retention-days: 90
- name: Publish spec artifacts as GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release delete latest --yes --cleanup-tag 2>/dev/null || true
gh release create latest artifacts/*.html artifacts/*.txt artifacts/*.xml artifacts/*.pdf \
--title "Latest spec artifacts" \
--notes "Auto-published spec build artifacts from commit ${{ github.sha }}.
Contains HTML, TXT, XML, and PDF renderings of all IETF Payment Auth specifications." \
--latest
- name: Generate index page
run: |
docker run --rm --user $(id -u):$(id -g) -e HOME=/data -v ${{ github.workspace }}:/data ietf-spec-tools:latest python3 /data/scripts/gen_index.py
- name: Generate problem pages
run: |
docker run --rm --user $(id -u):$(id -g) -e HOME=/data -v ${{ github.workspace }}:/data ietf-spec-tools:latest python3 /data/scripts/gen_problems.py
- name: Prepare GitHub Pages
run: |
mkdir -p _site
cp pages/index.html _site/
cp -r pages/problems _site/problems
cp artifacts/*.html artifacts/*.txt artifacts/*.xml artifacts/*.pdf _site/
echo "paymentauth.org" > _site/CNAME
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4