Use build_status instead of build param #70
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: Hugo Build | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# We have several possible workflows: | |
# - Push to master (regular static site generator) | |
# - Label an issue as "published" by the repo owner | |
# - Edit an issue which is "published" by the repo owner | |
jobs: | |
build: | |
# To see available associations: https://developer.github.com/v4/enum/commentauthorassociation/ | |
# Be careful that if this is left too open, it could result in arbitrary file | |
# upload, as the filename is directly derived from the issue title | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/checkout@v3 | |
with: | |
repository: dzervas/notion-markdown | |
path: notion-markdown | |
- name: Setup NPM | |
uses: actions/setup-node@v1 | |
- name: Install dependencies | |
run: npm ci | |
- name: Hugo setup | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
extended: true | |
- name: Download notion pages | |
run: notion-markdown/getter.py -c content/post -d static/img -u /img ${{ secrets.NOTIONDB_ID }} | |
- name: Build site | |
run: hugo --minify --gc | |
- name: Deploy to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{secrets.ACTIONS_DEPLOY_KEY}} | |
publish_branch: gh-pages | |
publish_dir: ./public | |
force_orphan: true |