diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d5ff7e7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +name: Publish documentation + +on: + push: + branches: + - main + +jobs: + + # Build documentation + build: + runs-on: ubuntu-latest + steps: + - name: Set up GitHub Pages + uses: actions/configure-pages@v4 + id: pages + - name: Render documentation + uses: TYPO3-Documentation/gh-render-action@0.1.0 + id: rendering + - name: Add index file + run: | + echo -e "\n\n\n\n\n\nGo to main page\n\n\n\nGo to main page\n\n\n" > ${{ steps.rendering.outputs.renderedPath }}/index.html + - name: Upload documentation artifact + uses: actions/upload-pages-artifact@v3 + with: + name: github-pages + path: ${{ steps.rendering.outputs.renderedPath }} + + # Deploy documentation + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy artifact to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4