-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 958 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- run: npm ci
- run: npx prettier --check .
- if: failure()
run: |
npx prettier --write .
git diff
- run: npx markdownlint-cli "**/*.md" --disable MD036
- run: hugo --minify
- run: npx wrangler pages deploy public --project-name ftmwiki --branch main
if: github.ref == 'refs/heads/main'
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}