Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Aug 11, 2024
1 parent a488063 commit 2738620
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 41 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Upload VitePress artifact
uses: actions/upload-artifact@v4
with:
name: vitepress-site
name: vitepress
path: docs/.vitepress/dist

# Build job for ESPHome
Expand All @@ -58,37 +58,29 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4


- name: Create Output Directory
run: mkdir -p output

- name: Download github-pages artifact
uses: actions/download-artifact@v4
with:
name: vitepress-site
name: vitepress
path: output

- name: Set up Python
uses: actions/setup-python@v4
- name: Compile ESPHome project
uses: esphome/build-action@v3.2.0
id: esphome-build
with:
python-version: 3.x

- name: Install ESPHome
run: pip install esphome

- name: Create ESPHome Output Directory
run: mkdir -p output/esphome
yaml_file: firmware/doorman-min.yaml
version: latest

- name: Compile ESPHome project
run: |
ls -la
esphome compile firmware/doorman-min.yaml
- run: |
mkdir output/esphome/
ls -la
- name: Move ESPHome build to /esphome directory
run: |
mv firmware/.esphome/build/* output/esphome/
mv "${{ steps.esphome-build.outputs.name}}" temp
mv temp doorman-stock-firmware
mv doorman-stock-firmware output/esphome/
- name: Upload all artifacts as github-pages
uses: actions/upload-artifact@v4
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/esphome-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,24 @@ jobs:
name: ${{ inputs.name }}
path: output

#publish:
# if: (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/docs-test')
# name: Publish new firmware
# runs-on: ubuntu-latest
# needs: [build]
# steps:
# - uses: actions/checkout@v3.5.3
# - uses: actions/download-artifact@v3.0.2
# with:
# path: output
# name: ${{ inputs.name }}
#
# - name: Create single manifest.json
# run: |
# jq -s '{"name": "${{ inputs.name }}", "version": "${{ needs.build.outputs.project-version }}", "home_assistant_domain": "esphome", "new_install_skip_erase": false, "builds":.}' output/*/manifest.json > output/${{ inputs.manifest_filename }}
# sed -i 's/${{ needs.build.outputs.esphome-build-name }}\//${{ inputs.directory_name }}\//g' output/${{ inputs.manifest_filename }}
#
# - uses: actions/upload-artifact@v4
# with:
# name: ${{ inputs.name }}
# path: output
publish:
if: (github.event_name == 'workflow_dispatch' || github.event_name == 'push') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/docs-test')
name: Publish new firmware
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3.5.3
- uses: actions/download-artifact@v3.0.2
with:
path: output
name: ${{ inputs.name }}

- name: Create single manifest.json
run: |
jq -s '{"name": "${{ inputs.name }}", "version": "${{ needs.build.outputs.project-version }}", "home_assistant_domain": "esphome", "new_install_skip_erase": false, "builds":.}' output/*/manifest.json > output/${{ inputs.manifest_filename }}
sed -i 's/${{ needs.build.outputs.esphome-build-name }}\//${{ inputs.directory_name }}\//g' output/${{ inputs.manifest_filename }}
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: output

0 comments on commit 2738620

Please sign in to comment.