Skip to content

[next] applies branding #20

[next] applies branding

[next] applies branding #20

Workflow file for this run

name: preview [cloudflare]
on:
pull_request:
# Sequence of patterns matched against refs/heads
branches:
- main
jobs:
site:
runs-on: ubuntu-latest
permissions:
actions: read
checks: read
contents: read
deployments: write
issues: write
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: moonrepo/setup-toolchain@abc36a5d744a0b6dff6fd87201c49917c145deb9 # v0.3.1
id: build
with:
auto-install: true
- run: |
moon --color --log info ci site:build
env:
ASTRO_STUDIO_APP_TOKEN: ${{ secrets.ASTRO_STUDIO_APP_TOKEN }}
# MOONBASE_SECRET_KEY: ${{ secrets.MOONBASE_SECRET_KEY }}
- uses: moonrepo/run-report-action@a92e881fd7c6bd680f64bfa1219ac7ddf3c3d009 # v1.6.1
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
id: deployment
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const script = require('./.github/scripts/create-deployment.cjs')
await script({github, context, core})
- uses: cloudflare/wrangler-action@7c01cc48d88a1f83b4716e0557c168854a9dcdb8 # v3.4.1
id: wrangler
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: "3.34.2"
workingDirectory: "apps/site"
packageManager: pnpm
command: pages deploy dist --project-name astrolicious
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
DEPLOYMENT_ID: ${{ steps.deployment.outputs.deployment-id }}
DEPLOYMENT_URL: ${{ steps.wrangler.outputs.deployment-url }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const script = require('./.github/scripts/update-deployment.cjs')
await script({github, context, core})