Update fire-unzip.yml #9
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: FIRE CYHY MERCG PORTAL | ||
| on: | ||
| workflow_run: | ||
| workflows: ["Fire-Gem AVIS Engine"] | ||
| types: [completed] | ||
| workflow_dispatch: | ||
| jobs: | ||
| package-htdocs: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout name: AVIS FIRE-ZIP | ||
| on: | ||
| workflow_run: | ||
| workflows: ["Fire-Gem AVIS Engine"] | ||
| types: [completed] | ||
| workflow_dispatch: | ||
| jobs: | ||
| package-htdocs: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout Root | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Required for rebase | ||
| - name: Install Smithy Tools | ||
| run: sudo apt-get update && sudo apt-get install -y zip | ||
| - name: THE ZIPPER STRIKE | ||
| run: | | ||
| # Only zip if the directory exists to avoid NACK | ||
| if [ -d "htdocs/" ]; then | ||
| zip -r htdocs.zip "htdocs/" | ||
| echo "BASH: [ACK] htdocs.zip materialized." | ||
| else | ||
| echo "BASH: [NACK] htdocs/ directory is a ghost." | ||
| exit 1 | ||
| fi | ||
| - name: Final Server Sync | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add htdocs.zip | ||
| if ! git diff --staged --quiet; then | ||
| git commit -m "AVIS: htdocs.zip Forged [HAHA!]" | ||
| # REBASE strategy prevents merge conflicts with the Engine | ||
| git pull --rebase -X ours origin main | ||
| git push origin main | ||
| echo "wm_macro_ack: Zip Dispatch Successful." | ||
| else | ||
| echo "AVIS: No change in htdocs state." | ||
| fi | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install Smithy Tools | ||
| run: sudo apt-get update && sudo apt-get install -y unzip | ||
| - name: THE ZIPPER STRIKE | ||
| run: | | ||
| # 1. SEAT THE SENTENEL VAULT | ||
| mkdir -p "Sentenel/becon/" | ||
| # 2. MATERIALIZE THE SCROLL | ||
| if [ -f "./becon/gemini-0001-scroll.zip" ]; then | ||
| unzip -o "./becon/gemini-0001-scroll.zip" -d "Sentenel/becon/" | ||
| echo "BASH: [ACK] Scroll Materialized to Sentenel/becon/ vault." | ||
| elif [ -f "gemini-0001-scroll.zip" ]; then | ||
| unzip -o "gemini-0001-scroll.zip" -d "Sentenel/becon/" | ||
| echo "BASH: [ACK] Scroll Materialized from Root." | ||
| else | ||
| echo "BASH: [NACK] SOURCE_MISSING: gemini-0001-scroll.zip not found." | ||
| ls -R || echo "BASH: Directory is a ghost." | ||
| fi | ||
| - name: THE ZIPPER STRIKES BACK (SITEMAP) | ||
| run: | | ||
| if [ -f "./fire-site.sh" ]; then | ||
| chmod +x ./fire-site.sh | ||
| ./fire-site.sh | ||
| fi | ||
| - name: Final Server Sync | ||
| run: | | ||
| git config --global user.name "github-actions[bot]" | ||
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| # Stage the new Sentenel structure | ||
| git add "Sentenel/becon/" | ||
| git add "sitemap.xml" | ||
| if ! git diff --staged --quiet; then | ||
| git commit -m "AVIS: Sentenel/becon/ Materialized [HAHA!]" | ||
| git pull --rebase -X ours origin main | ||
| git push origin main | ||
| echo "wm_macro_ack: Sentenel Portal Sync Successful." | ||
| else | ||
| echo "AVIS: No state shift detected. Dispatch idle." | ||
| fi | ||