Skip to content

Commit

Permalink
mirror beacon-apis deploy flow (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes authored Apr 12, 2023
1 parent b341642 commit f642e77
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@ on:
- "main"

jobs:
outputs:
releases: ${{ steps.releases.outputs.releases }}
steps:
- id: releases
run: |
echo "releases=$(curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/repos/${{github.repository}}/releases?per_page=100" | jq -c '[.[].tag_name]')" >> $GITHUB_OUTPUT
releases:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
release: ${{fromJson(needs.setup.outputs.releases)}}
steps:
- uses: dsaltares/[email protected]
with:
version: 'tags/${{ matrix.release }}'
file: 'builder-oapi.json'
target: 'deploy/releases/${{ matrix.release }}/builder-oapi.json'
- name: Save releases (artifact)
uses: actions/upload-artifact@v3
with:
name: releases
retention-days: 7
path: |
deploy/releases
deploy:
runs-on: ubuntu-latest
steps:
Expand All @@ -20,6 +45,11 @@ jobs:
cp -r dist ./deploy
cp -r assets ./deploy
cp -r index.html ./deploy
- name: Restore releases
uses: actions/download-artifact@v3
with:
name: releases
path: deploy/releases
- name: Bundle spec
run: "swagger-cli bundle ./builder-oapi.yaml -r -t yaml -o ./deploy/builder-oapi.yaml"
- name: Publish to Github Pages
Expand Down

0 comments on commit f642e77

Please sign in to comment.