Repository navigation
Add CSS-only motion and transitions to the deck (#25) #49
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 and deploy Marp slides | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "pages-${{ github.ref }}" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Copy slide assets | |
| run: | | |
| mkdir -p build | |
| cp -R slides/img slides/themes build/ | |
| - name: Marp build (HTML) | |
| uses: docker://marpteam/marp-cli:v4.5.0 | |
| with: | |
| args: --theme-set slides/themes -o build/index.html --html -- slides/Slides.md | |
| env: | |
| MARP_USER: root:root | |
| - name: Marp build (PDF) | |
| uses: docker://marpteam/marp-cli:v4.5.0 | |
| with: | |
| args: --theme-set slides/themes -o build/Slides.pdf --pdf --html --allow-local-files -- slides/Slides.md | |
| env: | |
| MARP_USER: root:root | |
| - name: Upload PDF artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: slides-pdf | |
| path: build/Slides.pdf | |
| if-no-files-found: error | |
| overwrite: true | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: build | |
| deploy: | |
| if: github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Set up Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 | |
| release: | |
| if: github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download PDF artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: slides-pdf | |
| path: release | |
| - name: Publish versioned PDF release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| RELEASE_TAG: slides-${{ github.run_number }}-${{ github.run_attempt }} | |
| COMMIT_SHA: ${{ github.sha }} | |
| run: | | |
| mv release/Slides.pdf release/mitre-attack-for-devs.pdf | |
| gh release create "$RELEASE_TAG" \ | |
| release/mitre-attack-for-devs.pdf \ | |
| --target "$COMMIT_SHA" \ | |
| --title "MITRE ATT&CK for Developers - $RELEASE_TAG" \ | |
| --generate-notes |