diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 245ded7..314be2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build query.rs +name: Build and deploy query.rs on: # Triggers the workflow on push or pull request events but only for the "main" branch @@ -8,9 +8,6 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -env: - ZINE_VERSION: v0.16.0 - # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read @@ -33,18 +30,16 @@ jobs: curl -sSfL https://github.com/mitsuhiko/minijinja/releases/latest/download/minijinja-cli-installer.sh | sh make -f web/Makefile cd web && ./build.sh - - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 with: - path: ./web/dist - - 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 \ No newline at end of file + apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} + accountId: $ {{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: query-rs + directory: ./web/dist + # Optional: Enable this if you want to have GitHub Deployments triggered + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + # By default this will be the branch which triggered this workflow + branch: main + # Change the Wrangler version, allows you to point to a specific version or a tag such as `beta` + wranglerVersion: '3' \ No newline at end of file