mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Deploy GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- _config.yml
|
|
- _layouts/**
|
|
- README.md
|
|
- CHANGELOG.md
|
|
- PRIVACY_POLICY.md
|
|
- CNAME
|
|
- .github/workflows/pages.yml
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Jekyll site
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Configure Pages
|
|
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d #v6.0.0
|
|
|
|
- name: Build with Jekyll
|
|
uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697 #v1.0.13
|
|
with:
|
|
source: ./
|
|
destination: ./_site
|
|
env:
|
|
JEKYLL_GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
- name: Sanity-check Jekyll output
|
|
run: test -f _site/index.html && test -f _site/CNAME
|
|
|
|
- name: Upload Pages artifact
|
|
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 #v5.0.0
|
|
with:
|
|
path: ./_site
|
|
|
|
deploy:
|
|
name: Deploy to GitHub Pages
|
|
needs: build
|
|
if: github.ref == 'refs/heads/main'
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 #v5.0.0
|