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 }}