Create test2.md #46
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: Build static site | |
| on: | |
| push: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Generate static HTML | |
| run: pelican content -s publishconf.py | |
| - name: Ensure CNAME file | |
| run: echo 'pedanticjournal.com' > docs/CNAME | |
| - name: Commit and push changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: 'docs' | |
| message: 'Automated site build' |