Deploy Aggregated Docs to Custom Domain #128
  
    
      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 Aggregated Docs to Custom Domain | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 2 * * *' # Runs daily at 2 AM UTC | |
| permissions: | |
| contents: write | |
| jobs: | |
| aggregate-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout `dataartifex.github.io` Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| - name: Fetch Docs for `dartfx-dditoolkit` Repository | |
| run: | | |
| rm -rf docs/dartfx-dditoolkit | |
| git clone --depth 1 --branch gh-pages https://${{ secrets.HVDNET_DEV_ACCESS_TOKEN }}@github.com/dataartifex/ddi-toolkit.git docs/dartfx-dditoolkit | |
| rm -rf docs/dartfx-dditoolkit/.git | |
| - name: Fetch Docs for `dartfx-postmanapi` Repository | |
| run: | | |
| rm -rf docs/dartfx-postmanapi | |
| git clone --depth 1 --branch gh-pages https://${{ secrets.HVDNET_DEV_ACCESS_TOKEN }}@github.com/dataartifex/postman-api.git docs/dartfx-postmanapi | |
| rm -rf docs/dartfx-postmanapi/.git | |
| - name: Fetch Docs for `dartfx-uscensus` Repository | |
| run: | | |
| rm -rf docs/dartfx-uscensus | |
| git clone --depth 1 --branch gh-pages https://${{ secrets.HVDNET_DEV_ACCESS_TOKEN }}@github.com/dataartifex/uscensus-toolkit.git docs/dartfx-uscensus | |
| rm -rf docs/dartfx-uscensus/.git | |
| - name: Commit and Push Aggregated Docs | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "[email protected]" | |
| git add . | |
| git commit -m "Update aggregated documentation" || echo "No changes to commit" | |
| git push origin main |