Skip to content

Merge branch 'develop' into new-branch #9

Merge branch 'develop' into new-branch

Merge branch 'develop' into new-branch #9

Workflow file for this run

name: CI
on:
repository_dispatch:
types: build-and-deploy
push:
branches:
- "**"
pull_request:
branches: [develop]
types: [opened, reopened, synchronize]
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check spelling
uses: codespell-project/actions-codespell@v2
with:
ignore_words_file: .github/codespell-ignore
skip: .git,**/*.png,**/*.gif,**/*.jpg,**/*.svg,**/*.ico,**/*.json,package.json,package-lock.json,*.lock,*.excalidraw,*.graphql,./blog-publisher/generated/graphql.ts
- name: Install and Build 🔧
run: |
npm install
npx prettier --check "**/*.{graphql,yml,json,md,sh,ts,tsx,js}"
npm run typecheck
npm run build
- name: Deploy 🚀
if: github.ref == 'refs/heads/develop'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build
- name: Get changed markdown files
id: changed-markdown-files
uses: tj-actions/changed-files@v44
with:
files: |
blog/**/*.{md,mdx}
- name: Publish to Hashnode and Dev.to 📝
if: github.ref == 'refs/heads/develop' && steps.changed-markdown-files.outputs.any_changed == 'true'
env:
HASHNODE_PAT: ${{ secrets.HASHNODE_PAT }}
HASHNODE_PUBLICATION_ID: ${{ secrets.HASHNODE_PUBLICATION_ID }}
CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
DEVTO_API_KEY: ${{ secrets.DEVTO_API_KEY}}
DEVTO_ORG_ID: ${{secrets.DEVTO_ORG_ID}}
DEVTO_ORG_NAME: ${{secrets.DEVTO_ORG_NAME}}
run: |
cd ./publish-externals
npm run generate
npx --yes tsx ./src/index.ts "$CHANGED_FILES"