Merge pull request #103 from British-Oceanographic-Data-Centre/develop #83
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive # Fetch Hugo themes and all extra projects | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.120.1' | |
extended: true | |
- name: Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Build | |
run: | | |
npm install -g postcss-cli | |
npm install autoprefixer | |
npm audit fix | |
hugo --minify | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{secrets.PUBLISH_TOKEN}} | |
external_repository: British-Oceanographic-Data-Centre/COAsT | |
#github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./docs |