Add CI
All checks were successful
Deploy Cloudflare Pages / deploy (push) Successful in 35s

This commit is contained in:
Syahrial Agni Prasetya 2024-02-15 17:05:04 +07:00
parent 624fce055a
commit 55d69aa1cb
Signed by: lemniskett
GPG Key ID: 24260130A908EB5A

View File

@ -0,0 +1,29 @@
name: Deploy Cloudflare Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.122.0'
- name: Build
run: "hugo --minify"
- name: Deploy to Cloudflare Pages
run: "npx --yes wrangler pages deploy --project-name $CLOUDFLARE_PAGES_PROJECT_NAME ./public --branch main"
env:
CLOUDFLARE_PAGES_PROJECT_NAME: ${{ secrets.CLOUDFLARE_PAGES_PROJECT_NAME }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}