pull/124/head
Till0196 1 year ago
parent 5e4d0d4e5c
commit 3a263c5849

@ -1,5 +1,9 @@
on: [push,workflow_dispatch] on: [push,workflow_dispatch]
env:
PROJECT_NAME: github-actions-example
PRODUCTION_BRANCH: develop
jobs: jobs:
example: example:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -30,9 +34,6 @@ jobs:
echo "$result" echo "$result"
echo 'EOF' echo 'EOF'
} >> "$GITHUB_OUTPUT" } >> "$GITHUB_OUTPUT"
env:
PROJECT_NAME: github-actions-example
PRODUCTION_BRANCH: develop
id: set-production-branch id: set-production-branch
- name: Publish to Cloudflare Pages - name: Publish to Cloudflare Pages
if: steps.set-production-branch.outcome == 'success' if: steps.set-production-branch.outcome == 'success'
@ -41,7 +42,7 @@ jobs:
# Explicit branch name needed because of: https://github.com/cloudflare/pages-action/issues/97 # Explicit branch name needed because of: https://github.com/cloudflare/pages-action/issues/97
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy example --project-name=github-actions-example --branch=${{ github.head_ref || github.ref_name }} command: pages deploy example --project-name=${{ env.PROJECT_NAME }}) --branch=${{ github.head_ref || github.ref_name }}
id: publish id: publish
- name: generate alias url - name: generate alias url
id: generate-alias-url id: generate-alias-url

Loading…
Cancel
Save