Merge pull request #56 from acherm/patch-12 #564
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: Publish website | |
on: | |
push: | |
branches: [ gh-pages-edit ] | |
# schedule: | |
# - cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 13.x | |
- name: Installing dependencies | |
run: | | |
cd tools | |
npm install | |
- name: Complementing site data | |
run: | | |
cd tools | |
export YOUTUBE_API_KEY=${{ secrets.YOUTUBE_API_KEY }} | |
npm run update | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.66.0' | |
extended: true | |
- name: Build website | |
run: hugo --minify | |
- name: Setting domain name | |
run: cp CNAME public/ | |
- name: Deploy website | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: master |