mirror of
https://github.com/netz39/www.netz39.de.git
synced 2025-01-31 09:33:18 +01:00
Merge pull request #120 from netz39/hotfix/gh-page_build-errors
Use another approach to use Jekyll without deprecated gh-pages jekyll gem
This commit is contained in:
commit
aef49b5b9a
2 changed files with 38 additions and 12 deletions
2
.github/workflows/jekyll-build.yml
vendored
2
.github/workflows/jekyll-build.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: Jekyll Build
|
||||
name: Test build (Jekyll)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
|
48
.github/workflows/jekyll-gh-pages.yml
vendored
48
.github/workflows/jekyll-gh-pages.yml
vendored
|
@ -12,8 +12,6 @@ on:
|
|||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
|
@ -24,6 +22,11 @@ concurrency:
|
|||
jobs:
|
||||
# Build job
|
||||
build:
|
||||
name: "Build GitHub Pages Site"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cached checkout
|
||||
|
@ -32,24 +35,47 @@ jobs:
|
|||
# with:
|
||||
# include: "*"
|
||||
# exclude: ""
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
- name: Build with Jekyll
|
||||
uses: actions/jekyll-build-pages@v1
|
||||
|
||||
- name: "Setup Ruby"
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
source: ./
|
||||
destination: ./_site
|
||||
- name: Upload artifact
|
||||
bundler-cache: true
|
||||
cache-version: 0 # Increment this number if you need to re-download cached gems.
|
||||
|
||||
- name: "Setup Pages"
|
||||
id: pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: "Build with Jekyll"
|
||||
run: bundle exec jekyll build --trace --baseurl "${{ steps.pages.outputs.base_path }}"
|
||||
env:
|
||||
JEKYLL_ENV: production
|
||||
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: _site/
|
||||
|
||||
# Deployment job
|
||||
|
||||
deploy:
|
||||
name: "Deploy GitHub Pages Site"
|
||||
if: github.event_name == 'push'
|
||||
needs:
|
||||
- build
|
||||
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
- name: "Deploy to GitHub Pages"
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
with:
|
||||
error_count: 0
|
||||
|
|
Loading…
Add table
Reference in a new issue