Skip to content

Commit

Permalink
Add features to Cloudflare and try deploying docs to cloudflare too
Browse files Browse the repository at this point in the history
  • Loading branch information
af-afk committed May 26, 2024
1 parent a6c0e1e commit 2b44aa4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 12 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ jobs:
cd pkg
forge doc -b
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd pkg/docs-out/book
git init
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m 'Deploy documentation'
git push --force --quiet "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:gh-pages
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
# update
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# update
projectName: ${{ secrets.CLOUDFLARE_DOCS_PROJECT_NAME }}
directory: out
# to enable Github Deployments
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
workingDirectory: pkg/docs-out/book
31 changes: 31 additions & 0 deletions .github/workflows/deploy-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy Features

on:
push:
branches:
- development
paths:
- 'features/**'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
# update
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# update
projectName: ${{ secrets.CLOUDFLARE_FEATURES_PROJECT_NAME }}
directory: out
# to enable Github Deployments
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
workingDirectory: features
2 changes: 1 addition & 1 deletion features/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"ui show demo data": false,
"ui show superloop": false,
"graphql mock demo data": false,
"graphql mock demo data should delay": true,
"graphql mock demo data should delay": false,
"ui show fee tier": false,
"ui show optimising fee route": false,
"ui show campaign banner": false,
Expand Down

0 comments on commit 2b44aa4

Please sign in to comment.