From 9ba6e796749adafc4d0712f8163b699ad0655ae3 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Tue, 29 Oct 2024 22:11:42 +0100 Subject: [PATCH] Test full deployment cycle --- .github/workflows/deploy.yaml | 65 ++++++++++++++++------------------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f647124..35beb87 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -81,44 +81,39 @@ jobs: done - name: ๐Ÿงช Display firmware artifacts run: ls -lR - - name: Move firmware files to docs + - name: ๐Ÿ—‚๏ธ Move firmware files to docs run: | mkdir output cp -R site/* output/ - cp -R firmwares/* output/ - - name: Move manifest files to root and modify paths - run: | - for device in firmwares/*; do - device=$(basename $device) - jq --arg device "$device" \ - '.builds[].ota.path |= $device + "/" + . | (.builds[].parts // [])[].path |= $device + "/" + .' \ - firmwares/$device/manifest.json > output/$device-manifest.json - done + cp -R firmwares/* output/firmware/ + # - name: Move manifest files to root and modify paths + # run: | + # for device in firmwares/*; do + # device=$(basename $device) + # jq --arg device "$device" \ + # '.builds[].ota.path |= $device + "/" + . | (.builds[].parts // [])[].path |= $device + "/" + .' \ + # firmwares/$device/manifest.json > output/$device-manifest.json + # done - name: ๐Ÿงช Display firmware artifacts run: ls -lR + - name: โฌ†๏ธ Upload pages artifacts + uses: actions/upload-pages-artifact@v3.0.1 + with: + path: output - # deploy: - # name: Deploy - # runs-on: ubuntu-latest - # needs: consolidate - # permissions: - # pages: write - # id-token: write - # # environment: - # # name: github-pages - # # url: ${{ steps.deployment.outputs.page_url }} - # steps: - # - name: โฌ‡๏ธ Download documentation artifact - # uses: actions/download-artifact@v4.1.8 - # with: - # name: site - # - name: โฌ‡๏ธ Download firmware artifacts - # uses: actions/download-artifact@v4.1.8 - # with: - # name: firmware - # path: firmware - # - name: Display firmware artifacts - # run: ls -lR - # # - name: ๐Ÿš€ Deploy to Github Pages - # # uses: actions/deploy-pages@v4.0.5 - # # id: deployment \ No newline at end of file + deploy: + name: Deploy + runs-on: ubuntu-latest + needs: consolidate + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: ๐Ÿ—๏ธ Setup Github Pages + uses: actions/configure-pages@v5.0.0 + - name: ๐Ÿš€ Deploy to Github Pages + uses: actions/deploy-pages@v4.0.5 + id: deployment \ No newline at end of file