Skip to content

Deploy to Preview - pull_request - 100/merge #213

Deploy to Preview - pull_request - 100/merge

Deploy to Preview - pull_request - 100/merge #213

Workflow file for this run

name: Deploy to Preview
run-name: ${{ github.workflow }} - ${{ github.event_name }} - ${{ github.ref_name }}
on:
pull_request:
workflow_dispatch:
env:
ARTIFACT: deployment-artifact
CF_PREVIEW_PROJECT_NAME: devdosvid-preview
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Hugo Website
uses: ./.github/actions/build-hugo-website
with:
env: preview
build-artifact: ${{ env.ARTIFACT }}
- name: Deploy to CloudFlare
uses: cloudflare/pages-action@1
id: deploy_to_cloudflare
with:
apiToken: ${{ secrets.CLOUDFLARE_GH_PAGES_ACTION_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ env.CF_PREVIEW_PROJECT_NAME }}
directory: ${{ env.ARTIFACT }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
wranglerVersion: '3'