-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPSEXP-2639 Switch to upstream jekyll workflow (#837)
- Loading branch information
Showing
1 changed file
with
10 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'}} |