fix: replace Cloudflare Pages action with direct API deploy using artifact
This commit is contained in:
1 parent
31882f6b73
commit
24273b5513
1 file changed
+11
-20
@@ -9,25 +9,16 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Create deployment artifact
|
||||||
uses: actions/checkout@v4
|
run: tar -czf site.tgz -C frontend/dist .
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: cd frontend && npm ci
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cd frontend && npm run build
|
|
||||||
|
|
||||||
- name: Deploy to Cloudflare Pages
|
- name: Deploy to Cloudflare Pages
|
||||||
uses: cloudflare/pages-action@v1
|
env:
|
||||||
with:
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
run: |
|
||||||
projectName: linearvoid
|
curl -sS -X POST \
|
||||||
directory: frontend/dist
|
"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/linearvoid/deployments" \
|
||||||
gitHubToken: ${{ secrets.GITEA_TOKEN }}
|
-H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary @site.tgz
|
||||||
Reference in new issue
Block a user