From dba7afef4dc9fc8ed2a70878d1a2a8eed32f3677 Mon Sep 17 00:00:00 2001 From: rizaldy Date: Mon, 12 Feb 2024 17:15:46 +0700 Subject: [PATCH] ci: setup --- .gitea/workflows/eleventy.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/eleventy.yaml b/.gitea/workflows/eleventy.yaml index a6d0df0..2bfbd02 100644 --- a/.gitea/workflows/eleventy.yaml +++ b/.gitea/workflows/eleventy.yaml @@ -7,15 +7,18 @@ jobs: steps: - uses: actions/checkout@master - - name: get last sha - run: echo "LAST_COMMIT=`git rev-parse --short HEAD`" >> $GITHUB_ENV - name: Build uses: TartanLlama/actions-eleventy@master + env: + LAST_COMMIT: $GITHUB_REF_NAME with: install_dependencies: true - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - uses: actions/setup-node@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist - cname: rizaldy.today + node-version: '20.x' + cache: "npm" + - run: npx wrangler pages deploy out --project-name=$CF_PROJECT_NAME --branch=$GITHUB_REF_NAME + env: + CLOUDFLARE_API_TOKEN: ${{ vars.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} + CF_PROJECT_NAME: ${{ vars.CF_PROJECT_NAME }}