Skip to content

Merge pull request #22 from rubytaiwan/add-ruby-central #22

Merge pull request #22 from rubytaiwan/add-ruby-central

Merge pull request #22 from rubytaiwan/add-ruby-central #22

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
# 只允許同時運行一個部署
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build Jekyll site
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --verbose
env:
JEKYLL_ENV: production
- name: List generated files
run: |
echo "Generated files in _site directory:"
find _site -type f | sort
echo ""
echo "Checking for CSS files:"
find _site -name "*.css" | sort
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "_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