From 596cf15fd561ba960d955d8452e1c0c5fbe1540d Mon Sep 17 00:00:00 2001 From: Joey Sabey Date: Sun, 12 May 2024 09:35:22 +0100 Subject: [PATCH] docs: total rework of manual publishing test --- .github/workflows/build-and-deploy-manual.yml | 67 +++++++++++++++++++ .github/workflows/publish-manual.yml | 34 ---------- 2 files changed, 67 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/build-and-deploy-manual.yml delete mode 100644 .github/workflows/publish-manual.yml diff --git a/.github/workflows/build-and-deploy-manual.yml b/.github/workflows/build-and-deploy-manual.yml new file mode 100644 index 0000000..0fa3f42 --- /dev/null +++ b/.github/workflows/build-and-deploy-manual.yml @@ -0,0 +1,67 @@ +name: Build & deploy Manual to GitHub Pages +on: + workflow_dispatch: + + #push: + # branches: + # - main + +jobs: + ## Build job ## + build: + name: Build manual pages + runs-on: ubuntu-latest + steps: + - name: Configure GitHub Pages + uses: actions/configure-pages@v3 + - name: Checkout main + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + docs + + - name: Download & unpack Nerd Fonts + env: + font: Ubuntu + version: v3.2.1 + destination: docs/assets/fonts/ + run: | + wget "https://github.com/ryanoasis/nerd-fonts/releases/download/${version}/${font}.zip" + unzip -j "${font}.zip" -d "${destination}/${font}" + + - name: Generate site files + run: mkdocs build + + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v3.0.1 + with: + path: "site/" + + ## Deploy job ## + deploy: + name: Deploy manual pages + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + + #- name: Deploy pages + # uses: mhausenblas/mkdocs-deploy-gh-pages@master + # env: + # PERSONAL_TOKEN: ${{ secrets.PERSONALTOKEN }} + # CONFIG_FILE: mkdocs.yml diff --git a/.github/workflows/publish-manual.yml b/.github/workflows/publish-manual.yml deleted file mode 100644 index 77fa922..0000000 --- a/.github/workflows/publish-manual.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Publish manual via GitHub Pages -on: - workflow_dispatch: - - push: - branches: - - main - -jobs: - build: - name: Deploy manual to pages - runs-on: ubuntu-latest - steps: - - name: Checkout main - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github - docs - - - name: Download & unpack Nerd Fonts - env: - font: Ubuntu - version: v3.2.1 - destination: docs/assets/fonts/ - run: | - wget "https://github.com/ryanoasis/nerd-fonts/releases/download/${version}/${font}.zip" - unzip -j "${font}.zip" -d "${destination}/${font}" - - - name: Deploy pages - uses: mhausenblas/mkdocs-deploy-gh-pages@master - env: - PERSONAL_TOKEN: ${{ secrets.PERSONALTOKEN }} - CONFIG_FILE: mkdocs.yml