A local-first personal finance app
Fix edge nightly deploy (#6753)
Michael Clark19ed2423d4c2
diff --git a/.github/workflows/edge-release.yml b/.github/workflows/edge-release.ymldeleted file mode 100644index 40eac83d02..0000000000--- a/.github/workflows/edge-release.yml+++ /dev/null@@ -1,46 +0,0 @@-name: Deploy nightly Edge--# Publish nightly version of Edge - Runs every day at midnight-on:- schedule:- - cron: '0 0 * * *'- workflow_dispatch:--defaults:- run:- shell: bash--env:- CI: true--concurrency:- group: ${{ github.workflow }}-${{ github.ref }}- cancel-in-progress: false--jobs:- build-and-deploy:- runs-on: ubuntu-latest- steps:- - name: Repository Checkout- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0- with:- ref: master-- - name: Set up environment- uses: ./.github/actions/setup-- - name: Install Netlify- run: npm install [email protected] -g-- - name: Build Actual- run: yarn build:browser-- - name: Deploy to Netlify Edge- id: netlify_deploy- run: |- netlify deploy \- --dir packages/desktop-client/build \- --site ${{ secrets.NETLIFY_EDGE_SITE_ID }} \- --auth ${{ secrets.NETLIFY_API_TOKEN }} \- --filter @actual-app/web \- --proddiff --git a/.github/workflows/publish-nightly-edge.yml b/.github/workflows/publish-nightly-edge.ymlnew file mode 100644index 0000000000..13fce0a002--- /dev/null+++ b/.github/workflows/publish-nightly-edge.yml@@ -0,0 +1,46 @@+name: Deploy nightly Edge++# Publish nightly version of Edge - Runs every day at midnight+on:+ schedule:+ - cron: '0 0 * * *'+ workflow_dispatch:++defaults:+ run:+ shell: bash++env:+ CI: true++concurrency:+ group: ${{ github.workflow }}-${{ github.ref }}+ cancel-in-progress: false++jobs:+ publish-latest-deploy:+ runs-on: ubuntu-latest+ steps:+ - name: Install Netlify CLI+ run: npm install [email protected] -g++ - name: Get Latest Deploy ID+ id: get_deploy+ run: |+ DEPLOY_ID=$(netlify api listSiteDeploys --data '{ "site_id": "${{ secrets.NETLIFY_EDGE_SITE_ID }}", "production": true, "state": "ready", "branch": "master", "per_page": 1 }' | jq -r '.[0].id')++ if [ -z "$DEPLOY_ID" ] || [ "$DEPLOY_ID" = "null" ]; then+ echo "::error::No valid deploy found"+ exit 1+ fi++ echo "deploy_id=$DEPLOY_ID" >> $GITHUB_OUTPUT+ env:+ NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_API_TOKEN }}++ - name: Restore and Publish Deploy+ # restoreSiteDeploy API call can bypass Netlify's lock function+ run: |+ netlify api restoreSiteDeploy --data '{ "site_id": "${{ secrets.NETLIFY_EDGE_SITE_ID }}", "deploy_id": "${{ steps.get_deploy.outputs.deploy_id }}" }'+ env:+ NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_API_TOKEN }}diff --git a/upcoming-release-notes/6753.md b/upcoming-release-notes/6753.mdnew file mode 100644index 0000000000..6b6d871bcb--- /dev/null+++ b/upcoming-release-notes/6753.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [MikesGlitch]+---++Fix edge nightly workflow