Skip to content

Preparazione lancio pubblico: setup.py sincronizzato + docs lancio #73

Preparazione lancio pubblico: setup.py sincronizzato + docs lancio

Preparazione lancio pubblico: setup.py sincronizzato + docs lancio #73

Workflow file for this run

name: Deploy Jekyll site to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
bundler-cache: true
cache-version: 0
working-directory: site
- name: Build with Jekyll
run: bundle exec jekyll build
working-directory: site
env:
JEKYLL_ENV: production
- name: Detect examples changes
id: examples_changed
run: |
if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
if git diff --name-only HEAD^ HEAD | grep -q '^docs/esempi/'; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Publish examples folder
if: github.event_name == 'workflow_dispatch' || steps.examples_changed.outputs.changed == 'true'
run: |
rm -rf site/_site/examples
cp -R docs/esempi site/_site/esempi
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/_site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4