Skip to content

Merge pull request #184 from bfdes/dependabot/npm_and_yarn/vfile-6.0.3 #382

Merge pull request #184 from bfdes/dependabot/npm_and_yarn/vfile-6.0.3

Merge pull request #184 from bfdes/dependabot/npm_and_yarn/vfile-6.0.3 #382

Workflow file for this run

name: Test & Publish
on: push
jobs:
test:
name: Test
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Pull repository
uses: actions/checkout@v3
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Upload test coverage report
uses: codecov/codecov-action@v3
publish:
name: Publish
needs: test
runs-on: ubuntu-latest
permissions:
deployments: write
steps:
- name: Pull repository
uses: actions/checkout@v3
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Build site
run: npm run build
- name: Publish site
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: blog
directory: site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}