fixme #133
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: Build & Deploy | |
| # Controls when the action will run. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Pages Branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: gh-pages | |
| submodules: recursive | |
| - name: Delete old build files | |
| run: rm -rf docs content | |
| - name: Clone Source Files | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| path: ./content | |
| - name: Setup Content | |
| run: | | |
| cd ./content && | |
| rm -f starter.tex && | |
| mv README.md _index.md && | |
| sed -i '{1d;8d;9s@.*@# Home@}' _index.md | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: 'latest' | |
| extended: true | |
| - uses: actions/cache@v4 | |
| with: | |
| path: /tmp/hugo_cache | |
| key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-hugomod- | |
| - name: Setup Presentation Content Page | |
| run: | | |
| chmod +x ./slideinator.sh | |
| ./slideinator.sh CSCC01 C01_CI-CD | |
| - name: Build Pages | |
| run: hugo --minify | |
| - name: Build Presentation PDF | |
| uses: docker://marpteam/marp-cli:v4.2.0 | |
| with: | |
| args: --no-browser-timeout --allow-local-files content/CSCC01/C01_CI-CD.marp/index.marp.md -o docs/CSCC01/ci-cd.pdf | |
| env: | |
| MARP_USER: root:root | |
| - name: Cleanup | |
| run: rm -rf content | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: . |