Skip to content

Commit

Permalink
Test full deployment cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasnicolaas committed Oct 29, 2024
1 parent a469965 commit 9ba6e79
Showing 1 changed file with 30 additions and 35 deletions.
65 changes: 30 additions & 35 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

0 comments on commit 9ba6e79

Please sign in to comment.