Skip to content

Commit

Permalink
Using Cloudflare for deployments of the guide (#12)
Browse files Browse the repository at this point in the history
* Cloudflare pages test

* Use default cloudflare parameters in the action

* Rename cloudfare app to pubgrub-rs-guide

* Remove netlify publish action

* Update link to published guide in readme
  • Loading branch information
mpizenberg authored Mar 29, 2024
1 parent d1e71ba commit bc0e91e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/cloudflare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on: [push]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3

# Build the guide to ./book
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.37'
# mdbook-version: 'latest'
- run: mdbook build

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: pubgrub-rs-guide
directory: book
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
# branch: main
# Optional: Change the working directory
# workingDirectory: my-site
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
# wranglerVersion: '3'
32 changes: 0 additions & 32 deletions .github/workflows/netlify.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PubGrub guide

Source for the PubGrub guide.
The published version is available at https://pubgrub-rs-guide.netlify.app/.
The published version is available at https://pubgrub-rs-guide.pages.dev.
This guide is made with [mdBook][mdbook].
To compile it locally, install mdBook and run

Expand Down

0 comments on commit bc0e91e

Please sign in to comment.