-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.01 KB
/
deploy-preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: 🚀 Deploy Preview
on:
pull_request:
branches:
- main
permissions: {}
jobs:
deploy-preview:
name: 🚀 Deploy Preview
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
environment:
name: preview
url: ${{ steps.deploy.outputs.deployment-url }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Zola
id: install_zola
uses: ./.github/actions/install-zola
- name: Build
id: build
working-directory: site
run: zola build
- name: Deploy
id: deploy
uses: cloudflare/wrangler-action@6d58852c35a27e6034745c5d0bc373d739014f7f # v3.13.0
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages deploy --branch ${{ github.head_ref }} --commit-dirty=true --commit-hash ${{ github.sha }}