Skip to content

wip: set CI permissions #5

wip: set CI permissions

wip: set CI permissions #5

Workflow file for this run

name: Main
on:
push:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build_openapi_spec:
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
with:
entrypoint: cmd/main.go
render_openapi_spec:
needs:
- build_openapi_spec
uses: CubicrootXYZ/Workflows/.github/workflows/[email protected]
with:
spec_artifact_name: openapi-spec
spec_artifact_path: docs/
spec_filename: swagger.yaml
deploy:
needs:
- render_openapi_spec
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@master
with:
name: rendered-api-docu
path: index.html
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4