mv portfolio-iii images to /photo/ #119
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: github pages | |
| on: | |
| push: | |
| branches: | |
| - source | |
| check_suite: | |
| types: [completed] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.157.0' | |
| extended: true | |
| # TODO: Get scheduler to work | |
| # | |
| # - name: Add scheduler | |
| # run: | | |
| # TIME=$(for d in $(cat $(find content/post -name "*.md") | awk '/date: / {gsub(/"/, "", $2); print $2 }'); do if [ "$d" != "null" ]; then expr $(date -d $d +\%s) - $(date +\%s); fi; done | awk '$1>=0' | sort -nk 1 | head -n 1); | |
| # if [ "$TIME" ] | |
| # then | |
| # RUNAT=$(date -d "+$TIME seconds" "+%Y-%m-%dT%H:%M:%SZ") | |
| # curl https://api.cronhooks.io/schedules \ | |
| # -X POST \ | |
| # -H 'Content-Type: application/json' \ | |
| # -H 'Authorization: Bearer ${{ secrets.CRONHOOKS_TOKEN }}' \ | |
| # -d \ | |
| # '{ | |
| # "title": "Run github pages action", | |
| # "url": "https://github.com/repos/:sams96/:sams96.github.io/dispatches", | |
| # "timezone": "europe/london", | |
| # "method": "POST", | |
| # "payload": { | |
| # "event_type": "scheduler" | |
| # }, | |
| # "contentType": "application/json; charset=utf-8", | |
| # "isRecurring": false, | |
| # "runAt": "'$RUNAT'" | |
| # }' | |
| # fi | |
| - name: Build | |
| run: hugo --minify | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: master | |
| publish_dir: ./public | |
| # keep_files: true | |
| cname: samsm.ch |