Skip to content

Modern Docker Management, Designed for Everyone

docs: switch to refined-cf-pages-action for deploying site

Kyle Mendellb24ca615766d
diff --git a/.github/workflows/build-preview-website.yml b/.github/workflows/build-preview-website.yml
new file mode 100644
index 000000000..b54b6b91b
--- /dev/null
+++ b/.github/workflows/build-preview-website.yml
@@ -0,0 +1,37 @@
+name: Build Preview Deployment
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
+ cancel-in-progress: true
+
+on:
+ pull_request:
+ types: [opened, synchronize]
+ paths:
+ - 'docs/**'
+
+jobs:
+ build-preview:
+ runs-on: macos-latest
+ defaults:
+ run:
+ working-directory: docs
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Build site
+ run: npm run build
+
+ - name: Upload build artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: preview-build
+ path: build
+ include-hidden-files: true
diff --git a/.github/workflows/deploy-preview-website.yml b/.github/workflows/deploy-preview-website.yml
new file mode 100644
index 000000000..549c5360c
--- /dev/null
+++ b/.github/workflows/deploy-preview-website.yml
@@ -0,0 +1,37 @@
+name: Upload Preview Deployment
+
+on:
+ workflow_run:
+ workflows: [Build Preview Deployment]
+ types:
+ - completed
+
+permissions:
+ actions: read
+ deployments: write
+ contents: read
+ pull-requests: write
+
+jobs:
+ deploy-preview:
+ runs-on: macos-latest
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
+ steps:
+ - name: Download build artifact
+ uses: actions/download-artifact@v4
+ id: preview-build-artifact
+ with:
+ name: preview-build
+ path: build
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ run-id: ${{ github.event.workflow_run.id }}
+
+ - name: Deploy to Cloudflare Pages
+ uses: AdrianGonz97/refined-cf-pages-action@v1
+ with:
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ githubToken: ${{ secrets.GITHUB_TOKEN }}
+ projectName: arcane
+ deploymentName: Preview
+ directory: build
diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml
new file mode 100644
index 000000000..9eef9190f
--- /dev/null
+++ b/.github/workflows/deploy-website.yml
@@ -0,0 +1,37 @@
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ deployments: write
+ name: Publish Docs to Cloudflare Pages
+ defaults:
+ run:
+ working-directory: docs
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Build site
+ run: npm run build
+
+ - name: Publish to Cloudflare Pages
+ uses: AdrianGonz97/refined-cf-pages-action@v1
+ with:
+ apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+ accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ githubToken: ${{ secrets.GITHUB_TOKEN }}
+ projectName: arcane
+ directory: build
+ deploymentName: Production
+ branch: main
+ workingDirectory: docs
+ wranglerVersion: '3'