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 c838268 commit d6ca6a0
Showing 1 changed file with 38 additions and 16 deletions.
54 changes: 38 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,55 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
run: npm ci
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
run: npm run docs:build
- name: Move VitePress build to pages directory
run: mkdir -p pages/docs && mv docs/.vitepress/dist/* pages/docs/
- name: Upload VitePress artifact
uses: actions/upload-artifact@v4
with:
path: docs/.vitepress/dist
name: vitepress-site
path: pages/docs

compile-firmware:
name: Compile Doorman Stock Firmware
uses: ./.github/workflows/esphome-build.yml
with:
files: ./firmware/doorman-stock.yaml
name: Doorman
manifest_filename: doorman-stock-manifest.json
esphome_version: latest
directory_name: doorman-stock
# Build job for ESPHome
build-esphome:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install ESPHome
run: pip install esphome
- name: Compile ESPHome project
run: esphome compile ./firmware/doorman-stock.yaml
- name: Move ESPHome build to pages directory
run: mkdir -p pages/esphome && mv .esphome/build/* pages/esphome/
- name: Upload ESPHome artifact
uses: actions/upload-artifact@v4
with:
name: esphome-firmware
path: pages/esphome

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: [build-docs, compile-firmware]
needs: [build-docs, build-esphome]
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: pages

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
with:
path: pages

0 comments on commit d6ca6a0

Please sign in to comment.