diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index f4e446d..4178c26 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -8,35 +8,12 @@ on: - 'ui/**' - '.github/workflows/deploy-pages.yml' -jobs: - get-credentials: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - outputs: - cloudflare_token: ${{ steps.creds.outputs.cloudflare_token }} - account_id: ${{ steps.creds.outputs.account_id }} - steps: - - uses: actions/checkout@v4 - with: - repository: CHITTYOS/chittyops - sparse-checkout: .github/actions/getchitty-creds - path: .chittyops - - - name: Fetch ephemeral credentials - id: creds - uses: ./.chittyops/.github/actions/getchitty-creds - with: - purpose: 'pages-deploy' - service: 'chittycommand-ui' +permissions: + contents: read +jobs: deploy: - needs: get-credentials runs-on: ubuntu-latest - permissions: - contents: read - deployments: write steps: - uses: actions/checkout@v4 @@ -55,9 +32,9 @@ jobs: working-directory: ui - name: Deploy to Cloudflare Pages - uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3 + uses: cloudflare/wrangler-action@v3 with: - apiToken: ${{ needs.get-credentials.outputs.cloudflare_token }} - accountId: ${{ needs.get-credentials.outputs.account_id }} + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: pages deploy dist --project-name=chittycommand-ui workingDirectory: ui diff --git a/.github/workflows/deploy-worker.yml b/.github/workflows/deploy-worker.yml index b72ff4d..61a9786 100644 --- a/.github/workflows/deploy-worker.yml +++ b/.github/workflows/deploy-worker.yml @@ -11,10 +11,12 @@ on: permissions: contents: read - id-token: write jobs: deploy: uses: CHITTYOS/chittyops/.github/workflows/reusable-worker-deploy.yml@main with: service_name: chittycommand + secrets: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}