Fix format of cpp #121
This file contains 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: Deploy Test | |
on: | |
pull_request: | |
branches: [master] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ runner.os }}-${{ hashFiles('**/requirements.txt') }} | |
path: .cache | |
- name: Install dependencies | |
run: | | |
pip3 install -U -r requirements.txt | |
- name: Verify mkdocs installation | |
run: | | |
mkdocs --version | |
- name: Clean old build | |
run: | | |
echo "Cleaning old build..." | |
rm -rf site | |
echo "Old build cleaned." | |
- name: Build site | |
run: | | |
echo "Building the site..." | |
mkdocs build | |
echo "Build complete. Listing current directory structure:" | |
ls -la | |
echo "Listing 'site' directory structure:" | |
if [ -d "site" ]; then | |
ls -la site | |
else | |
echo "'site' directory does not exist." | |
fi | |
- name: Check Deployment | |
run: | | |
if [ -d "site" ]; then | |
echo "Deploy would have succeeded!" | |
else | |
echo "Deploy would have failed!" | |
# gh pr close ${{ github.event.pull_request.number }} | |
exit 1 | |
fi | |
env: | |
GH_TOKEN: ${{ secrets.GH_PAT }} | |
# - name: Close PR if build failed | |
# if: failure() | |
# run: | | |
# echo "Closing PR due to build failure..." | |
# gh pr close ${{ github.event.pull_request.number }} | |
# env: | |
# GH_TOKEN: ${{ secrets.GH_PAT }} |