From 6e1f3cc399c5e5eaabe0da8a8447e6e3de435824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lohrer?= <1091954+joerglohrer@users.noreply.github.com> Date: Tue, 12 Mar 2024 06:58:33 +0100 Subject: [PATCH] Create publish-documents.yml --- .github/workflows/publish-documents.yml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/publish-documents.yml diff --git a/.github/workflows/publish-documents.yml b/.github/workflows/publish-documents.yml new file mode 100644 index 0000000..9ecd063 --- /dev/null +++ b/.github/workflows/publish-documents.yml @@ -0,0 +1,40 @@ +name: Publish documents +on: [push] + +env: + OUTPUT_FILENAME: "document" + USER_AGENT: "$GITHUB_REPOSITORY ($GITHUB_SERVER_URL/$GITHUB_REPOSITORY)" + +jobs: + prepare-and-build-documents: + runs-on: ubuntu-latest + container: + image: registry.gitlab.com/tibhannover/oer/markdown-pandoc-processor + steps: + - uses: actions/checkout@v3 + - run: | + /build/process.sh + ls -l + mkdir .public + cp -r * .public + mv .public public + - uses: actions/upload-pages-artifact@v1 + with: + path: ./public + + # Deployment job + deploy: + if: ${{ github.ref == 'refs/heads/main' }} + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: prepare-and-build-documents + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2