pages github action not working

so i want to deploy from github pages to cloudflare pages, but apparently its not working here is the code (host.yml):
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ***
projectName: ***
directory: .
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
wranglerVersion: '3'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ***
projectName: ***
directory: .
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
wranglerVersion: '3'
and here is the result:
No description
6 Replies
Michał @ yournextstore.com
You don't have the actions/checkout step Try following the README here: https://github.com/cloudflare/pages-action But is there a reason you're not using the GitHub integration that you can set up directly from Cloudflare dashboard? https://github.com/apps/cloudflare-pages
Michał @ yournextstore.com
In your Cloudflare Pages project settings:
No description
Cyb3r-Jak3
Cyb3r-Jak313mo ago
Are you getting errors in the pages deployment section?
trevi꧁
trevi꧁OP13mo ago
sorry, i wanted to keep it short, but heres the full code: https://github.com/eltrevii/link/blob/main/.github/workflows/host.yml edit: i just realized the cloudflare pages action uses checkout in the same step ☠️ yes, because i need the output of the actions workflow, not the repository files directly no, just the "uploading 0 files" part and an npm warning because the cloudflare action still uses wrangler <something> publish instead of deploy so it seems like if i do the checkout and the other action on a separate job it doesnt see the files or smth so i have to repeat the steps for the cloudflare pages job which is eh i mean it works but you know
Cyb3r-Jak3
Cyb3r-Jak313mo ago
You do need to re-checkout because GitHub actions separates jobs into seperate runs. You can use artifacts to pass between jobs
trevi꧁
trevi꧁OP13mo ago
oh ok
Want results from more Discord servers?
Add your server