aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authoradamjanovsky2022-05-27 08:00:09 +0200
committerGitHub2022-05-27 08:00:09 +0200
commit23832d00a541b2d42859bd3f1aeaca4c514bcb82 (patch)
tree4f322859b8321ba88a47abbdcccbb7c50179e72e /.github/workflows
parent0c12f7fec7778279a9c6ab1fc3d1b6868e7dcd86 (diff)
parent1de0b977015e625db30a98f22cac4f098fbb404c (diff)
downloadsec-certs-23832d00a541b2d42859bd3f1aeaca4c514bcb82.tar.gz
sec-certs-23832d00a541b2d42859bd3f1aeaca4c514bcb82.tar.zst
sec-certs-23832d00a541b2d42859bd3f1aeaca4c514bcb82.zip
Merge pull request #196 from crocs-muni/issue/195-Docs
Docs
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/docs.yml48
-rw-r--r--.github/workflows/draft_release.yml20
-rw-r--r--.github/workflows/release.yml6
3 files changed, 71 insertions, 3 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 00000000..f5df9712
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,48 @@
+name: "Build docs"
+on:
+ push:
+ workflow_dispatch:
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Install external dependencies
+ run: sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y
+ - name: Install sec-certs and deps
+ run: |
+ pip install -r requirements/requirements.txt
+ pip install -r requirements/dev_requirements.txt
+ pip install -e .
+ - name: Build docs
+ run: |
+ cd docs
+ make html
+ - name: Save docs artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: docs
+ path: docs/_build/html/
+ retention-days: 7
+ upload:
+ runs-on: ubuntu-latest
+ needs: build
+ if: github.ref == 'refs/heads/main' && github.repository == 'crocs-muni/sec-certs' # Potentially change this into a check on release.
+ steps:
+ - name: Get docs artifact
+ uses: actions/download-artifact@v3
+ with:
+ name: docs
+ path: docs
+ - name: Archive docs
+ run: |
+ cd docs
+ zip -r docs.zip *
+ - name: Push docs to website
+ run: |
+ curl -F data=@docs/docs.zip https://seccerts.org/docs/upload?token=${{ secrets.DOCS_AUTH_TOKEN }}
diff --git a/.github/workflows/draft_release.yml b/.github/workflows/draft_release.yml
new file mode 100644
index 00000000..95e2cadc
--- /dev/null
+++ b/.github/workflows/draft_release.yml
@@ -0,0 +1,20 @@
+name: Create release draft
+
+on:
+ push:
+ branches:
+ - "main"
+ tags:
+ - "*.*.*"
+
+jobs:
+ draft-release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Release
+ uses: softprops/action-gh-release@v1
+ with:
+ draft: true
+ generate_release_notes: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9063beaa..3a061417 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,5 +1,5 @@
name: Release (PyPi, DockerHub)
-on:
+on:
release:
types: [published]
@@ -27,7 +27,7 @@ jobs:
docker_release:
name: Release on DockerHub
runs-on: ubuntu-latest
- if: github.repository == 'crocs-muni/sec-certs'
+ if: github.repository == 'crocs-muni/sec-certs'
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@@ -47,6 +47,6 @@ jobs:
id: docker_build
uses: docker/build-push-action@v2
with:
- file: docker/Dockerfile
+ file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}