diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 3b0b97e..0f7bd1f 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -1,4 +1,4 @@ -on: [push] +on: [workflow_dispatch] jobs: example: diff --git a/.github/workflows/example2.yml b/.github/workflows/example2.yml new file mode 100644 index 0000000..924a7f3 --- /dev/null +++ b/.github/workflows/example2.yml @@ -0,0 +1,23 @@ +on: [push,workflow_dispatch] + +jobs: + example: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + name: Example + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Publish to Cloudflare Pages + uses: cloudflare/wrangler-action@v3 + with: + # Explicit branch name needed because of: https://github.com/cloudflare/pages-action/issues/97 + branch: ${{ github.head_ref || github.ref_name }} + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + environment: 'production' + command: pages deploy example --project-name=github-actions-example --branch=main + id: publish +