incorporating composite viewer #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: deploy-frontend-preview/edge | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| - 'main' | |
| paths: | |
| - 'frontend/**' | |
| - '.github/workflows/deploy-frontend-preview.yml' | |
| workflow_dispatch: | |
| inputs: | |
| git-ref: | |
| description: 'Git ref (optional)' | |
| required: false | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest | |
| # queued. But do not cancel in-progress runs - we want these deploymeents to complete. | |
| concurrency: | |
| group: 'deploy-frontend-preview/edge' | |
| cancel-in-progress: false | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| deploy: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| actions: read | |
| id-token: write | |
| environment: | |
| name: frontend-preview-edge | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Wait for frontend to build | |
| id: wait-build-frontend | |
| uses: lucasssvaz/wait-on-workflow@v1 | |
| with: | |
| workflow: build-frontend.yaml | |
| sha: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - name: Download built frontend | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: frontend | |
| path: ./frontend/build/ui | |
| github-token: ${{ github.token }} | |
| run-id: ${{ steps.wait-build-frontend.outputs.run-id }} | |
| - name: Push to youseetoo.github.io | |
| # Accessible at https://youseetoo.github.io/imswitch/ui/index.html | |
| uses: cpina/github-action-push-to-another-repository@main | |
| env: | |
| SSH_DEPLOY_KEY: ${{ secrets.YOUSEETOO_SSH_DEPLOY_KEY }} | |
| with: | |
| source-directory: ./frontend/build | |
| destination-github-username: youseetoo | |
| destination-repository-name: youseetoo.github.io | |
| target-directory: imswitch | |
| user-email: "bene.d@gmx.de" | |
| target-branch: main | |
| commit-message: Deploy React frontend |