diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index e289d6f..5277a7e 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -9,15 +9,14 @@ on: - "CHANGELOG.md" - "Amado/Resources/Assets.xcassets/AppIcon.appiconset/icon_1024.png" - ".github/workflows/deploy-site.yml" + - "wrangler.jsonc" workflow_dispatch: permissions: contents: read - pages: write - id-token: write concurrency: - group: pages + group: deploy-site cancel-in-progress: false jobs: @@ -49,7 +48,7 @@ jobs: BUST="${GITHUB_SHA:0:8}" sed -i "s#\"./style.css\"#\"./style.css?v=${BUST}\"#g" "$SITE"/*.html - # A Pages deploy replaces the whole site. Always take Sparkle's feed + # A site deploy replaces the whole site. Always take Sparkle's feed # from the latest GitHub Release so a first release does not depend on # an appcast already existing on the website. if [ -n "$VERSION" ]; then @@ -60,16 +59,32 @@ jobs: echo "No release yet; appcast.xml is not expected" fi - - uses: actions/upload-pages-artifact@v5 + - name: Add static asset headers + run: cp web/_headers "$RUNNER_TEMP/site/_headers" + + - uses: actions/upload-artifact@v4 with: + name: site path: ${{ runner.temp }}/site + include-hidden-files: true + retention-days: 1 deploy: needs: build runs-on: ubuntu-latest environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + name: cloudflare + url: https://amado.pangmo5.dev steps: - - id: deployment - uses: actions/deploy-pages@v5 + - uses: actions/checkout@v6 + - uses: actions/download-artifact@v4 + with: + name: site + path: dist + - name: Deploy static assets + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + wranglerVersion: "4.131.2" + command: deploy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77a0ab6..caf7ab0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release # Push a tag such as v0.1.0 to build, sign, notarize, and publish the macOS # agent. The workflow also signs the archive for Sparkle, then dispatches the -# dedicated site workflow so Pages receives a deployment from the main branch. +# dedicated site workflow so Workers receives a deployment from the main branch. on: push: tags: @@ -372,11 +372,7 @@ jobs: git commit -m "amado ${VERSION}" git push - # A tag and its main-branch commit can share GITHUB_SHA. Deploying Pages - # directly from both runs reuses pages_build_version and can report - # success without replacing the earlier artifact. A workflow_dispatch of - # the dedicated site workflow avoids that collision and always downloads - # the appcast from the GitHub Release published above. + # Deploy from main after the canonical signed release feed is available. - name: Deploy website with release appcast env: GH_TOKEN: ${{ github.token }} diff --git a/.gitignore b/.gitignore index 2767a8d..d3f5c7c 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,7 @@ fastlane/test_output/ *.cer *.pem *.certSigningRequest + +# Cloudflare local output +/dist/ +/.wrangler/ diff --git a/Project.swift b/Project.swift index 6f89fc6..d4fceed 100644 --- a/Project.swift +++ b/Project.swift @@ -90,7 +90,7 @@ let project = Project( "NSLocalNetworkUsageDescription": .string(localNetworkUsage), "NSBonjourServices": .array([.string("_amado._tcp")]), "NSBluetoothAlwaysUsageDescription": .string(bluetoothUsageMac), - "SUFeedURL": "https://pangmo5.dev/Amado/appcast.xml", + "SUFeedURL": "https://amado.pangmo5.dev/appcast.xml", "SUEnableAutomaticChecks": true, "SUPublicEDKey": "$(SPARKLE_PUBLIC_ED_KEY)", ]), diff --git a/fastlane/metadata/en-US/description.txt b/fastlane/metadata/en-US/description.txt index 4bdd630..350f31f 100644 --- a/fastlane/metadata/en-US/description.txt +++ b/fastlane/metadata/en-US/description.txt @@ -18,4 +18,4 @@ SECURE PAIRING Scan the QR code shown by the Mac app to pair. Commands and their matching responses are authenticated with HMAC-SHA256, fresh timestamps, and one-time nonces. Amado can lock your Mac and report its lock state. It cannot unlock it. -The free Amado macOS companion app is required. Download it from pangmo5.dev/Amado/ or GitHub. +The free Amado macOS companion app is required. Download it from amado.pangmo5.dev/ or GitHub. diff --git a/fastlane/metadata/en-US/marketing_url.txt b/fastlane/metadata/en-US/marketing_url.txt index 6fdf8c7..3f57d6a 100644 --- a/fastlane/metadata/en-US/marketing_url.txt +++ b/fastlane/metadata/en-US/marketing_url.txt @@ -1 +1 @@ -https://pangmo5.dev/Amado/ +https://amado.pangmo5.dev/ diff --git a/fastlane/metadata/en-US/privacy_url.txt b/fastlane/metadata/en-US/privacy_url.txt index d9a821d..2b2a4df 100644 --- a/fastlane/metadata/en-US/privacy_url.txt +++ b/fastlane/metadata/en-US/privacy_url.txt @@ -1 +1 @@ -https://pangmo5.dev/Amado/privacy.html +https://amado.pangmo5.dev/privacy.html diff --git a/fastlane/metadata/en-US/support_url.txt b/fastlane/metadata/en-US/support_url.txt index 6fdf8c7..3f57d6a 100644 --- a/fastlane/metadata/en-US/support_url.txt +++ b/fastlane/metadata/en-US/support_url.txt @@ -1 +1 @@ -https://pangmo5.dev/Amado/ +https://amado.pangmo5.dev/ diff --git a/fastlane/metadata/review_information/notes.txt b/fastlane/metadata/review_information/notes.txt index eecde1f..95b5cfb 100644 --- a/fastlane/metadata/review_information/notes.txt +++ b/fastlane/metadata/review_information/notes.txt @@ -1,7 +1,7 @@ Amado is a companion app for the free Amado macOS menu bar agent. The companion requires macOS 15 or later and does not require an account or purchase. Review steps: -1. On the iPhone setup screen, tap Get Amado for Mac or visit https://pangmo5.dev/Amado/. +1. On the iPhone setup screen, tap Get Amado for Mac or visit https://amado.pangmo5.dev/. 2. Install and open the Mac app. 3. Choose Show pairing code in the Amado menu bar menu. 4. In the iPhone app, tap Scan pairing QR and scan the code. diff --git a/web/_headers b/web/_headers new file mode 100644 index 0000000..b36d78a --- /dev/null +++ b/web/_headers @@ -0,0 +1,2 @@ +/appcast.xml + Cache-Control: public, max-age=0, must-revalidate diff --git a/web/caffeinate.html b/web/caffeinate.html index f9e5dcc..f9ed96b 100644 --- a/web/caffeinate.html +++ b/web/caffeinate.html @@ -49,7 +49,7 @@ Licensing
This page renders docs/CAFFEINATE.md from main, the single source of truth. Not affiliated with Apple Inc.
This page renders docs/CONFIGURATION.md from main, the single source of truth. Not affiliated with Apple Inc.
The Mac app is AGPL-3.0-only; iPhone, Watch, Widget, and shared core sources are MPL-2.0. Not affiliated with Apple Inc.
- + diff --git a/web/privacy.html b/web/privacy.html index 0a0120c..8bee406 100644 --- a/web/privacy.html +++ b/web/privacy.html @@ -49,7 +49,7 @@ LicensingThis page renders docs/PRIVACY.md from main, the single source of truth. Not affiliated with Apple Inc.
Rendered from CHANGELOG.md and CHANGELOG-iOS.md on main. Not affiliated with Apple Inc.