Add new project from OKF network #473
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: github pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.92.2' | |
extended: true | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
# The action defaults to search for the dependency file (package-lock.json, | |
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its | |
# hash as a part of the cache key. | |
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data | |
cache-dependency-path: '**/package-lock.json' | |
- name: Install npm modules | |
run: npm ci | |
- name: Extract metadata | |
run: python extract-projects-categories.py | |
- name: Create specialists pages | |
run: python create-specialists-pages.py | |
- name: Create projects pages | |
run: python create-projects-pages.py | |
- name: Build | |
run: hugo --minify | |
- name: Configure domain name | |
run: echo 'network.okfn.org' > public/CNAME | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |