From 91b7ec266e9e0e314940abe0e8acc1eb22dde9ab Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo <71768+gionn@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:17:28 +0200 Subject: [PATCH] OPSEXP-2639 Switch to upstream jekyll workflow (#837) --- .github/workflows/docs.yml | 58 +++++++------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dbda31fe3..dd1694b3e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,65 +1,27 @@ -name: Deploy docs +name: Publish docs on: push: - branches: ["master"] + branches: + - master paths: - "docs/**" - ".github/workflows/docs.yml" pull_request: - branches: ["master"] + branches: + - master paths: - "docs/**" - ".github/workflows/docs.yml" -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: docs - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Setup Ruby - uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 # v1.173.0 - with: - working-directory: '${{ github.workspace }}/docs' - bundler-cache: true - - - name: Setup Pages - id: pages - uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - - - name: Build with Jekyll - run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" - env: - JEKYLL_ENV: production - - - name: Upload artifact - if: github.event_name == 'push' && github.ref_name == 'master' - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 - with: - path: "docs/_site/" - - deploy: - runs-on: ubuntu-latest - if: github.event_name == 'push' && github.ref_name == 'master' - concurrency: - group: "pages" - cancel-in-progress: true - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 + publish: + uses: Alfresco/jekyll-build-tools/.github/workflows/jekyll-publish.yml@8005b9df0d121e530b3d5fdcefab8ae5885040b8 + with: + working-directory: docs + publish: ${{ github.event_name == 'push' && github.ref_name == 'master'}}