Deploy Flexiva to TriSys Site #22
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 Flexiva to TriSys Site | |
| on: | |
| workflow_dispatch: # Manual trigger (keep this) | |
| repository_dispatch: # NEW - Automatic trigger from main repo | |
| types: [main-updated] | |
| jobs: | |
| deploy-customer: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Download the obfuscated code from first repo: https://github.com/TriSys-Business-Software/Flexiva | |
| - name: Download Latest Obfuscated Code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: TriSys-Business-Software/Flexiva | |
| ref: gh-pages | |
| token: ${{ secrets.MAIN_REPO_TOKEN }} | |
| path: . | |
| # Get files from THIS repo (second repo) to overwrite | |
| - name: Get Branding Files from This Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: temp-branding | |
| # Copy OUR custom files over the downloaded files | |
| - name: Overwrite with this web site files | |
| run: | | |
| cp temp-branding/configuration/custom/custom.js ./configuration/custom/custom.js | |
| cp temp-branding/configuration/forms.json ./configuration/forms.json | |
| rm -rf temp-branding | |
| # We can also copy images/logos and CSS if we wish | |
| echo "✅ Custom Files overwritten with TriSys versions" | |
| - name: Deploy to Customer GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./ | |
| cname: flexiva.trisys.co.uk |