Build Blog #223
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: Build Blog | |
on: | |
push: | |
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-latest | |
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: 'yarn' | |
- name: install package | |
run: yarn | |
- name: build site | |
run: yarn 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 }} | |
branch: ${{ github.ref_name }} | |
# - 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 |