Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Oct 6, 2024
1 parent 5ae4a85 commit 2553732
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 58 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/branch_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:

name: "Main Branch"

permissions:
contents: read

jobs:
test:
name: "Test"
Expand Down
58 changes: 1 addition & 57 deletions .github/workflows/part_docs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
on:
workflow_call:
inputs:
releaseName:
required: false
type: string
publishToPages:
required: false
type: boolean
default: false
workflow_call: {}

name: "Documentation"

Expand Down Expand Up @@ -52,51 +44,3 @@ jobs:
with:
path: docs

deploy_pages:
name: "Deploy to GitHub Pages"

runs-on: ubuntu-latest

if: ${{ inputs.publishToPages }}

needs: ["generate"]

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

upload_release:
name: "Upload"

runs-on: ubuntu-latest

if: ${{ inputs.releaseName }}

needs: ["generate"]

permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: docs
path: docs
- run: |
tar -czvf docs.tar.gz docs
- name: Upload
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release upload --clobber "${{ inputs.releaseName }}" \
docs.tar.gz
3 changes: 3 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:

name: "Pull Request"

permissions:
contents: read

jobs:
test:
name: "Test"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tag-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ on:

name: "Beta Tag"

permissions:
contents: read

jobs:
release:
name: "Release"

permissions:
contents: write

uses: ./.github/workflows/part_release.yml
with:
releaseName: "${{ github.ref_name }}"
Expand Down
64 changes: 63 additions & 1 deletion .github/workflows/tag-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ on:

name: "Stable Tag"

permissions:
contents: read

jobs:
release:
name: "Release"

permissions:
contents: write

uses: ./.github/workflows/part_release.yml
with:
releaseName: "${{ github.ref_name }}"
Expand All @@ -22,4 +28,60 @@ jobs:
uses: ./.github/workflows/part_docs.yml
with:
releaseName: "${{ github.ref_name }}"
publishToPages: true

deploy_pages:
name: "Deploy to GitHub Pages"

needs: ["release", "docs"]

runs-on: ubuntu-latest

if: ${{ inputs.publishToPages }}

needs: ["generate"]

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

upload_release:
name: "Upload"

needs: ["release", "docs"]

runs-on: ubuntu-latest

if: ${{ inputs.releaseName }}

needs: ["generate"]

permissions:
contents: write
attestations: write

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: docs
path: docs
- run: |
tar -czvf docs.tar.gz docs
- name: Upload
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release upload --clobber "${{ inputs.releaseName }}" \
docs.tar.gz
- name: "Attest Documentation"
uses: actions/attest@v1
subject-path: "docs.tar.gz"

0 comments on commit 2553732

Please sign in to comment.