Update pages.yaml #20
Workflow file for this run
This file contains hidden or 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
| name: Deploy Jekyll site to Pages | ||
| on: | ||
| push: | ||
| branches: | ||
| - stable | ||
| paths: | ||
| - 'docs/**' | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
| concurrency: | ||
| group: 'pages' | ||
| cancel-in-progress: true | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| # Étape cruciale : On dit à Ruby de travailler DANS le dossier /docs | ||
| - name: Setup Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.3' | ||
| bundler-cache: true | ||
| working-directory: ./docs | ||
| - name: Setup GitHub Pages | ||
| id: pages | ||
| uses: actions/configure-pages@v5 | ||
| # Étape cruciale : On construit le site DANS le dossier /docs | ||
| - name: Build Jekyll site | ||
| run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | ||
| env: | ||
| JEKYLL_ENV: production | ||
| working-directory: ./docs | ||
| # On charge le site construit qui se trouve dans docs/_site | ||
| - name: Upload artifact to GitHub Pages | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: 'docs/_site' | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||