Skip to content

Commit

Permalink
chore: updated deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Dec 17, 2024
1 parent bfd38c3 commit e78898f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/update-configuration.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Update Manifest and Commit Changes
name: "Update Configuration and Build"

on:
workflow_dispatch:
push:

jobs:
update-manifest:
name: "Update Manifest and Commit Changes"
name: "Update Configuration & Build"
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Update Manifest and Commit Changes
uses: ubiquity-os/action-deploy-plugin@main
- uses: ubiquity-os/action-deploy-plugin@main
with:
treatAsEsm: false
sourcemap: false
pluginEntry: ${{ github.workspace }}/src/main.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
16 changes: 16 additions & 0 deletions .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,22 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
KERNEL_PUBLIC_KEY: ${{ secrets.KERNEL_PUBLIC_KEY }}

- name: Update manifest.json worker url
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
const manifestPath = path.resolve("${{ github.workspace }}", './manifest.json');
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
manifest["url"] = "${{ steps.wrangler_deploy.outputs.deployment-url }}";
const updatedManifest = JSON.stringify(manifest, null, 2);
fs.writeFileSync(manifestPath, updatedManifest);
console.log('Updated manifest:', updatedManifest);
- name: Write Deployment URL to Summary
run: |
echo "### Deployment URL" >> $GITHUB_STEP_SUMMARY
Expand Down

0 comments on commit e78898f

Please sign in to comment.