rizaldy.today/.gitea/workflows/eleventy.yaml

27 lines
813 B
YAML
Raw Normal View History

2023-02-20 20:03:59 +07:00
name: eleventy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
2024-02-13 10:40:10 +07:00
- id: last_commit
run: echo "git_hash=$(git rev-parse --short "$GITHUB_SHA")" >> $LAST_COMMIT
2023-02-20 20:03:59 +07:00
- name: Build
uses: TartanLlama/actions-eleventy@master
2024-02-12 17:15:46 +07:00
env:
2024-02-13 10:40:10 +07:00
LAST_COMMIT: ${{ env.last_commit }}
2023-02-20 20:06:19 +07:00
with:
install_dependencies: true
2024-02-12 17:15:46 +07:00
- uses: actions/setup-node@v3
2023-07-09 03:24:05 +07:00
with:
2024-02-12 17:15:46 +07:00
node-version: '20.x'
cache: "npm"
2024-02-12 17:25:35 +07:00
- run: npx wrangler pages deploy dist --project-name=$CF_PROJECT_NAME --branch=$GITHUB_REF_NAME
2024-02-12 17:15:46 +07:00
env:
CLOUDFLARE_API_TOKEN: ${{ vars.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
CF_PROJECT_NAME: ${{ vars.CF_PROJECT_NAME }}