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 Pelican Site | |
| on: | |
| push: | |
| branches: | |
| - main # Change this to your default branch if it's not 'main' | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.x' # Specify the Python version you want to use | |
| - name: Install dependencies | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| pip install pelican[markdown] ghp-import | |
| - name: Build site | |
| run: | | |
| source venv/bin/activate | |
| pelican content -s publishconf.py | |
| - name: Deploy to GitHub Pages | |
| run: | | |
| source venv/bin/activate | |
| ghp-import -n -p -f output | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |