render potyarkin.com #1798
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: render potyarkin.com | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- smallweb | |
schedule: | |
- cron: 45 4,16 * * * | |
jobs: | |
render: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: get current date for cache keys | |
id: date | |
run: |- | |
echo "::set-output name=date::$(/bin/date -u '+%Y%m%d')" | |
echo "::set-output name=month::$(/bin/date -u '+%Y%m')" | |
- uses: actions/cache@v3 | |
name: pip cache | |
with: | |
path: cache/pip | |
key: pip-${{ hashFiles('requirements.txt') }}-${{ steps.date.outputs.month }} | |
restore-keys: | | |
pip-${{ hashFiles('requirements.txt') }} | |
pip- | |
- uses: actions/cache@v3 | |
name: webring cache | |
with: | |
path: cache/webring | |
key: webring-${{ hashFiles('content/blogroll.yml') }}-${{ steps.date.outputs.date }} | |
restore-keys: | | |
webring-${{ hashFiles('content/blogroll.yml') }} | |
webring- | |
- uses: actions/cache@v3 | |
name: whatsnew cache | |
with: | |
path: |- | |
cache/whatsnew | |
cache/whatsnew.json | |
cache/feedlinks.json | |
key: whatsnew-${{ hashFiles('content/bookmarks.yml') }}-${{ steps.date.outputs.date }} | |
restore-keys: | | |
whatsnew-${{ hashFiles('content/bookmarks.yml') }} | |
whatsnew- | |
- run: make publish | |
env: | |
PIP_CACHE_DIR: cache/pip | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: html | |
publish_branch: html | |
commit_message: |- | |
render: ${{ github.event.head_commit.message }} | |
Render static website for GitHub pages from | |
commit |