diff --git a/.github/workflows/build-page.yml b/.github/workflows/build-page.yml index 563a59c..df2d81e 100644 --- a/.github/workflows/build-page.yml +++ b/.github/workflows/build-page.yml @@ -6,14 +6,13 @@ on: branches: - 'main' paths: - - 'otterdog/*.jsonnet' - 'docs/**' - 'mkdocs.yml' - '.github/workflows/build-page.yml' concurrency: group: "pages" - cancel-in-progress: false + cancel-in-progress: true permissions: contents: read @@ -21,79 +20,10 @@ permissions: id-token: write jobs: - generate-markdown: - # do not run the workflow in the template repo itself - if: ${{ !contains (github.repository, '/.eclipsefdn-template') }} - runs-on: ubuntu-latest - steps: - - name: Checkout eclipse-csi/otterdog - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - repository: eclipse-csi/otterdog - path: otterdog - - - name: Checkout EclipseFdn/otterdog-configs - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - repository: EclipseFdn/otterdog-configs - path: otterdog-configs - - # checkout the HEAD ref - - name: Checkout HEAD - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - path: ${{ github.repository_owner }} - - - name: Install jsonnet-bundler - run: | - go install -a github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.5.1 - echo $(go env GOPATH)/bin >> $GITHUB_PATH - - - name: Install poetry - run: pipx install poetry - - - name: Setup Python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 - with: - python-version: '3.10' - cache: 'poetry' - - - name: Install dependencies with poetry - run: | - poetry install --only=main - working-directory: otterdog - - - name: Copy configuration from HEAD ref - run: | - mkdir -p orgs/${{ github.repository_owner }} - cp -r ../${{ github.repository_owner }}/otterdog/* orgs/${{ github.repository_owner }} - working-directory: otterdog-configs - - - name: Generate default configuration as markdown - run: ../otterdog/otterdog.sh show-default ${{ github.repository_owner }} -c otterdog.json --markdown > default.txt - working-directory: otterdog-configs - - - name: Upload generated site content - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 - with: - name: generated-site - path: | - otterdog-configs/default.txt - otterdog-configs/orgs/${{ github.repository_owner }}/vendor/otterdog-defaults/*.libsonnet - build-page: runs-on: ubuntu-latest - needs: generate-markdown steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Download generated site content - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - with: - name: generated-site - - shell: bash - run: | - cat default.txt >> ./docs/playground.md - cp orgs/${{ github.repository_owner }}/vendor/otterdog-defaults/*.libsonnet ./docs/jsonnet/ + - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: 3.x