Skip to content

Commit

Permalink
Feat: add test build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmykreee committed Dec 12, 2023
1 parent 70f2f6b commit 7d94f8d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test building site

on:
workflow_dispatch:

jobs:

deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
submodules: true

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true

- name: Build
run: hugo --minify

- name: Upload Build Artifact
if: success()
uses: actions/upload-artifact@v3
with:
name: build-result
path: public
if-no-files-found: error

- name: Deploy to Cloudflare Pages
if: success()
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: d73a30412652351305e3f89fd125f690
projectName: blog
directory: public
branch: dev

0 comments on commit 7d94f8d

Please sign in to comment.