Update CI workflow permissions and deploy token #60
This file contains hidden or 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: CI | |
| on: [push, pull_request] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| run: sudo apt-get install -y cmake g++ libboost-all-dev libssl-dev doxygen | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Build application | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. | |
| make | |
| - name: Build tests | |
| run: | | |
| cd tests | |
| mkdir build | |
| cd build | |
| cmake .. | |
| make | |
| - name: Run tests | |
| env: | |
| EB_CLIENT_CERTIFICATE_DATA: ${{ secrets.EB_CLIENT_CERTIFICATE_DATA }} | |
| EB_CLIENT_PRIVATE_KEY_DATA: ${{ secrets.EB_CLIENT_PRIVATE_KEY_DATA }} | |
| EB_SERVER_CERTIFICATE_DATA: ${{ secrets.EB_SERVER_CERTIFICATE_DATA }} | |
| EB_SERVER_PRIVATE_KEY_DATA: ${{ secrets.EB_SERVER_PRIVATE_KEY_DATA }} | |
| run: | | |
| cd tests/build | |
| ./tests | |
| - name: Generate Doxygen Documentation | |
| run: doxygen Doxyfile | |
| - name: Extract and Store Project Name | |
| run: | | |
| PROJECT_NAME=$(grep "PROJECT_NAME" Doxyfile | grep -v "^#" | awk -F "\"" '{print $2}') | |
| echo $PROJECT_NAME > html/project_name.txt | |
| - name: Deploy Doxygen Documentation to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@4.1.5 | |
| with: | |
| token: ${{ github.token }} | |
| branch: gh-pages | |
| folder: html | |
| clean: true | |
| - name: Trigger GitHub Pages Deployment | |
| run: | | |
| curl -X POST https://api.github.com/repos/pauleaster/pauleaster.github.io/dispatches \ | |
| -H 'Accept: application/vnd.github.everest-preview+json' \ | |
| -u ${{ secrets.TLSBUFFERCOMM_LAUNCH_WEBSITE_DEPLOY }} \ | |
| --data '{"event_type": "tls-buffer-comm-deploy"}' | |