Skip to content

Commit

Permalink
test webflasher upload
Browse files Browse the repository at this point in the history
  • Loading branch information
foorschtbar committed Oct 11, 2023
1 parent 36044d0 commit 54caa80
Showing 1 changed file with 52 additions and 12 deletions.
64 changes: 52 additions & 12 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ jobs:
pip install --upgrade platformio esptool
- name: Run PlatformIO build on selected platforms 🏗️
run: platformio run -e ESP8266_generic -e ESP8266_nodemcuv2 -e ESP32_generic -e ESP32_d1_mini32 -e ESP8266_d1_mini -e ESP32_ulanzi
#run: platformio run -e ESP8266_generic -e ESP8266_nodemcuv2 -e ESP32_generic -e ESP32_d1_mini32 -e ESP8266_d1_mini -e ESP32_ulanzi
run: platformio run -e ESP32_ulanzi

- name: Merge ESP32 firmware to single binaries 🔧
run: |
Expand Down Expand Up @@ -113,25 +114,64 @@ jobs:
file_glob: true
prerelease: ${{ env.prerelease }}

deploy-webui-gh-pages:
upload-fw-to-docs:
needs: build-fw
runs-on: ubuntu-latest
needs: build-webui
if: startsWith(github.ref, 'refs/tags/')
# if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
repository: "pixelit-project/WebUI"
repository: "pixelit-project/PixelIt.Docs"
path: docs

- name: Download artifacts 💾
uses: actions/download-artifact@v3
with:
name: pixelit-webui
path: webui
name: pixelit-firmware
path: artifacts

- name: Prepare binaries for web flasher 🚀
run: |
mkdir -p upload
cp ./docs/src/.vuepress/public/pixelit_flasher/firmware/firmware_*.bin ./upload/
cp -rf ./artifacts/*/firmware_*.bin ./upload/
- name: Display structure of downloaded files 🔍
run: ls -R ./upload/

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
- name: Upload binaries to PixelIt.Docs for web flasher 🚀
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
branch: gh-pages # The branch the action should deploy to.
folder: . # The folder the action should deploy.
clean: false # Automatically remove deleted files from the deploy branch
source-directory: "upload"
destination-github-username: "pixelit-project"
destination-repository-name: "PixelIt.Docs"
user-email: bot@pixelit
target-branch: master
target-directory: "src/.vuepress/public/pixelit_flasher/firmware/"
commit-message: pushed from $GITHUB_REF via GitHub Actions

# deploy-webui-gh-pages:
# runs-on: ubuntu-latest
# needs: build-webui
# if: startsWith(github.ref, 'refs/tags/')
# steps:
# - name: Checkout 🛎️
# uses: actions/checkout@v4
# with:
# repository: "pixelit-project/WebUI"

# - name: Download artifacts 💾
# uses: actions/download-artifact@v3
# with:
# name: pixelit-webui
# path: webui

# - name: Deploy 🚀
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# branch: gh-pages # The branch the action should deploy to.
# folder: . # The folder the action should deploy.
# clean: false # Automatically remove deleted files from the deploy branch

0 comments on commit 54caa80

Please sign in to comment.