.github/workflows/generate-json.yml #1201
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
on: | |
schedule: | |
- cron: '30 5,17 * * *' | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
paths: | |
- 'README.md' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: awesome-lint | |
run: ./.github/workflows/repo_linter.sh | |
generate: | |
runs-on: ubuntu-latest | |
name: A job to extract links | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Extract Links | |
id: extralinks | |
uses: mipmip/[email protected] | |
with: | |
section: Templates | |
in-file: README.md | |
out-file: templates_tmp.json | |
- name: download embgit | |
run: cd /tmp && wget -c https://github.com/quiqr/embgit/releases/download/0.5.2/embgit_Linux_x86_64.tar.gz -O - | tar -xz | |
- name: parse and flatten repo meta | |
run: ./.github/workflows/getmeta.sh | |
# - name: download md2html | |
# run: cd /tmp && wget -c https://github.com/nocd5/md2html/releases/download/v2.0.0/md2html_linux_amd64.zip && unzip md2html_linux_amd64.zip | |
# | |
- name: Generate markdowns from json | |
run: ./.github/workflows/json-to-markdowns.py | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.81.0' | |
extended: true | |
- name: Build | |
run: hugo --minify --baseURL https://quiqr.github.io/quiqr-community-templates/ | |
- name: Copy templates.json to public | |
run: cp public2/templates.json public/ | |
- name: Copy thumbs to public | |
run: cp -av public2/templates public/ | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |