Skip to content

Commit

Permalink
OPSEXP-2639 Switch to upstream jekyll workflow (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn authored Apr 12, 2024
1 parent c266c05 commit 91b7ec2
Showing 1 changed file with 10 additions and 48 deletions.
58 changes: 10 additions & 48 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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'}}

0 comments on commit 91b7ec2

Please sign in to comment.