Skip to content

update at 2023-10-08 #172

update at 2023-10-08

update at 2023-10-08 #172

Workflow file for this run

name: Build Blog
on:
push:
branches: [ main ]
paths:
- src/**
- public/**
- functions/**
- "*.mjs"
- "*.json"
workflow_call:
secrets:
CLOUDFLARE_ACCOUNT_ID:
required: true
CLOUDFLARE_API_TOKEN:
required: true
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-release
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: install package
run: npm ci
- name: build site
run: npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: blog
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- run: sleep 60
- name: Send webmentions
run: node pipeline/send-mentions.js
- name: Run scraper
env:
HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
CONFIG_FILE_PATH: meili.json
run: |
docker run -t --rm \
-e MEILISEARCH_HOST_URL=$HOST_URL \
-e MEILISEARCH_API_KEY=$API_KEY \
-v $PWD:/blog \
getmeili/docs-scraper:latest pipenv run ./docs_scraper /blog/meili.json