diff --git a/.github/workflows/asciidoctor-ghpages.yml b/.github/workflows/asciidoctor-ghpages.yml index 69fb619..87116c8 100644 --- a/.github/workflows/asciidoctor-ghpages.yml +++ b/.github/workflows/asciidoctor-ghpages.yml @@ -9,19 +9,35 @@ env: DEBIAN_FRONTEND: noninteractive jobs: - build: - runs-on: ubuntu-22.04 + configure: + name: Configure Github Pages Publishing + runs-on: intel-ubuntu-22.04 + outputs: + enable_publish: ${{ steps.check.outputs.isfork == 'NO' }} + steps: + - id: check + name: Check if Fork + run: | + if [ "${{ github.repository }}" = "intel/compile-time-init-build" ]; then + echo "This is the main repository, **enabling publishing**" >> "$GITHUB_STEP_SUMMARY" + echo "isfork=NO" >> "$GITHUB_OUTPUT" + else + echo "This is a fork, **disabling publishing**" >> "$GITHUB_STEP_SUMMARY" + echo "isfork=YES" >> "$GITHUB_OUTPUT" + fi + build: + needs: configure + name: Build Documentation + runs-on: intel-ubuntu-22.04 steps: - name: Checkout source uses: actions/checkout@v4 - - name: Install asciidoctor run: | sudo apt update sudo apt install -y asciidoctor sudo gem install asciidoctor asciidoctor-diagram rouge - - name: Build documentation run: | mkdir -p ./generated-html @@ -30,29 +46,26 @@ jobs: touch ./generated-html/.nojekyll ls -la ./generated-html cat ./generated-html/index.html - - name: Setup github pages + if: needs.configure.outputs.enable_publish == 'true' uses: actions/configure-pages@v3 - - name: Upload artifacts uses: actions/upload-pages-artifact@v2 with: path: ./generated-html deploy: - needs: build - + needs: [configure, build] + if: needs.configure.outputs.enable_publish == 'true' + name: Deploy Documentation permissions: contents: read pages: write id-token: write - environment: name: github-pages url: $${{ steps.deployment.outputs.page_url }} - - runs-on: ubuntu-22.04 - + runs-on: intel-ubuntu-22.04 steps: - name: Deploy to github pages id: deployment diff --git a/.github/workflows/release_header.yml b/.github/workflows/release_header.yml deleted file mode 100644 index d18a3ce..0000000 --- a/.github/workflows/release_header.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Publish Release Header - -on: - workflow_dispatch: - push: - branches: [ main ] - -env: - DEBIAN_FRONTEND: noninteractive - -jobs: - build: - runs-on: intel-ubuntu-22.04 - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Build Release Header - run: | - mkdir -p ./generated-hpp - python3 tools/gen_release_header.py include safe.hpp > ./generated-hpp/safe.hpp - - - name: Setup github pages - uses: actions/configure-pages@v3 - - - name: Upload artifacts - uses: actions/upload-pages-artifact@v2 - with: - path: ./generated-hpp - - deploy: - needs: build - - permissions: - contents: read - pages: write - id-token: write - - environment: - name: github-pages - url: $${{ steps.deployment.outputs.page_url }} - - runs-on: intel-ubuntu-22.04 - - steps: - - name: Deploy to github pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/README.md b/README.md index 7857315..10bc91e 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ bug-free code. It allows variables and functions to advertise and enforce requirements at compile-time. The requirements are guaranteed to be held true at runtime. +[![CppCon 2023. Safe Arithmetic: Have your integer and add it to two!](https://img.youtube.com/vi/E1LfLQ13bgA/0.jpg)](https://www.youtube.com/watch?v=E1LfLQ13bgA) + ## Pre-release Disclaimer This library is a work in progress and should not yet be used in production.