From 1cfd87ac5229c0a0ee6a79e4cc084c9d6b1dcd4c Mon Sep 17 00:00:00 2001 From: Kor Nielsen Date: Sun, 10 Dec 2023 23:56:15 -0800 Subject: [PATCH] Publish website --- .github/workflows/nightly-release.yml | 14 +++++++++ .github/workflows/publish-website.yml | 45 +++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/publish-website.yml diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 4d0c33df11..fb8636d171 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -60,6 +60,11 @@ jobs: echo "release_ref=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT echo "Current ref $(git rev-parse HEAD) will receive tag ${TAG_BASE}${INDEX} after tests" + + publish-website: + name: Publish https://caliptra-sw.github.io/ + uses: ./.github/workflows/publish-website.yml + fpga-full-suite-etrng-log: name: FPGA Suite (etrng, log) needs: find-latest-release @@ -144,6 +149,15 @@ jobs: ./ci-tools/release/build_release.sh ${{ needs.find-latest-release.outputs.new_release_tag }} mv ./release/release.zip ./release/caliptra_${{ needs.find-latest-release.outputs.new_release_tag }}.zip + - name: 'Download all artifacts' + uses: actions/download-artifact@v3 + with: + path: /tmp/artifacts + + - name: Package all test artifacts for release + run: | + (cd /tmp/artifacts && zip -r - .) > ./release/test_artifacts_${{ needs.find-latest-release.outputs.new_release_tag }}.zip + - name: Tag repo with new release number run: | git config --global user.name "GitHub CI" diff --git a/.github/workflows/publish-website.yml b/.github/workflows/publish-website.yml new file mode 100644 index 0000000000..13141efd7e --- /dev/null +++ b/.github/workflows/publish-website.yml @@ -0,0 +1,45 @@ +name: Publish website + +on: + workflow_call: + pull_request: + +jobs: + build: + runs-on: ubuntu-22.04 + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Generate HTML + run: | + cd ci-tools/test-matrix + mkdir /tmp/www + CPTRA_WWW_OUT=/tmp/www cargo run --release + + - name: Generate GitHub Pages artifacts + uses: actions/upload-pages-artifact@v1 + with: + path: /tmp/www + + deploy: + runs-on: ubuntu-22.04 + + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 \ No newline at end of file