From 55d69aa1cb2502ca68feed715daacb086564095e Mon Sep 17 00:00:00 2001 From: Syahrial Agni Prasetya Date: Thu, 15 Feb 2024 17:05:04 +0700 Subject: [PATCH] Add CI --- .gitea/workflows/deploy-cloudflare.yml | 29 ++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitea/workflows/deploy-cloudflare.yml diff --git a/.gitea/workflows/deploy-cloudflare.yml b/.gitea/workflows/deploy-cloudflare.yml new file mode 100644 index 0000000..3b22a70 --- /dev/null +++ b/.gitea/workflows/deploy-cloudflare.yml @@ -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 }}