Remove build folder step in gh-deploy.yml #42
This file contains 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: marp-to-pages | |
concurrency: marp-to-pages | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
pages: write | |
id-token: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Get List of investigations | |
run: sh ./investigations/list_investigations.sh | |
- name: Copy investigations | |
run: cp -r ./investigations ./build | |
- name: Rename README.md to index.md | |
run: find ./build -type f -name "README.md" -execdir mv {} index.md \; | |
- name: Download moj theme | |
run: wget https://raw.githubusercontent.com/ministryofjustice/marp-moj-theme/main/themes/moj.css | |
- name: Marp Build (Investigations) | |
run: npx @marp-team/marp-cli@latest ./build --html --theme moj.css | |
- name: Copy mission statement images directory | |
run: cp -R mission_statement/images build/images | |
- name: Marp Build (Mission statement) | |
run: | | |
npx @marp-team/marp-cli@latest mission_statement/README.md \ | |
-o build/index.html --theme moj.css --html | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'build/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |