Merge pull request #13 from NASA-AMMOS/release/v4-1-1 #10
Workflow file for this run
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: Generate PDFs | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| workflow_dispatch: | |
| jobs: | |
| generate-pdfs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Build Site | |
| run: npm run build | |
| - name: Run Site | |
| run: npm run serve & | |
| - name: Install Prince | |
| run: | | |
| curl https://www.princexml.com/download/prince-15.4.1-linux-generic-x86_64.tar.gz -O | |
| tar zxf prince-15.4.1-linux-generic-x86_64.tar.gz | |
| cd prince-15.4.1-linux-generic-x86_64 | |
| yes "" | sudo ./install.sh | |
| - name: Wait for Site to be Ready | |
| run: | | |
| until curl --output /dev/null --silent --head --fail http://localhost:3000; do | |
| echo "Waiting for site to be ready..." | |
| sleep 5 | |
| done | |
| - name: Generate PDFs | |
| run: sh ./scripts/generate-pdfs/generate-pdfs.sh | |
| - name: Upload PDFs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plandev-docs-pdfs | |
| path: pdf | |
| if-no-files-found: error |