From 04d479a73ca202b7045bdc5a4b905b5888b2d6f0 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Sun, 10 Jan 2021 09:42:30 +0000 Subject: [PATCH 1/2] Create rust.yml --- .github/workflows/rust.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..d9ddaaa --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,29 @@ +name: Rust + +on: + push: + branches: [ main, develop, actions ] + pull_request: + branches: [ main, develop, actions ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Install Snekdown + run: cargo install snekdown --all-features + - name: Create dist + run: mkdir dist + - name: Build + run: snekdown render main.md dist/index.html + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: documentation.html + path: dist/index.html From be98561e198ce119b6d2675d6919b74d4a3c09c0 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 10 Jan 2021 10:54:22 +0100 Subject: [PATCH 2/2] Change build to use precompiled snekdown Signed-off-by: trivernis --- .github/workflows/{rust.yml => snekdown.yml} | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) rename .github/workflows/{rust.yml => snekdown.yml} (51%) diff --git a/.github/workflows/rust.yml b/.github/workflows/snekdown.yml similarity index 51% rename from .github/workflows/rust.yml rename to .github/workflows/snekdown.yml index d9ddaaa..be2cc31 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/snekdown.yml @@ -1,4 +1,4 @@ -name: Rust +name: Snekdown on: push: @@ -17,13 +17,17 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Snekdown - run: cargo install snekdown --all-features + run: wget https://github.com/Trivernis/snekdown/releases/latest/download/snekdown-linux-x86_64 -O snekdown + - name: Make executable + run: chmod +x snekdown - name: Create dist run: mkdir dist - name: Build - run: snekdown render main.md dist/index.html + run: ./snekdown render main.md dist/documentation.html + - name: Build PDF + run: ./snekdown render main.md dist/documentation.pdf - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: documentation.html - path: dist/index.html + name: documentation + path: dist/*