fix gh action 18 #23
This file contains 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: Update Pelican Site | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
pages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Pelican | |
run: pip install pelican[markdown] pelican-tag-cloud pymdown-extensions | |
- name: Build site | |
run: pelican content -d -v | |
# Fix permissions and ensure no symlinks | |
- name: Fix file permissions | |
run: | | |
find ./output -type f -exec chmod 644 {} \; | |
find ./output -type d -exec chmod 755 {} \; | |
find ./output -type l -exec rm {} \; # Remove any symlinks if found | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: github-pages | |
path: ./output # Ensure this is the correct path to your build directory | |
- name: Deploy site | |
uses: actions/deploy-pages@v4 |