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