Skip to content

Commit

Permalink
Deploy to Cloudflare pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Folyd committed Jun 28, 2024
1 parent f12d50b commit 1296c02
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
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'

0 comments on commit 1296c02

Please sign in to comment.