diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index fc887825..e4377f03 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -5,34 +5,47 @@ on: branches: - trunk - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -# permissions: -# contents: read -# pages: write -# id-token: write - -# # Allow one concurrent deployment -# concurrency: -# group: "pages" -# cancel-in-progress: true - jobs: - # Build job deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 20 + + - name: Install OS Dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y git cmake ninja-build wget zip + sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex + sudo apt-get install -y python3 python3-pip + sudo apt-get install -y chromium + + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + + - name: Install Dependencies + run: | + npm ci + npm run install-build-deps + + - name: Lint + run: | + npm run lint + + - name: Build + run: | + npm run build - - run: npm ci - run: npm run build-docs - name: Deploy to GitHub Pages @@ -44,3 +57,12 @@ jobs: # cname: example.com # if wanna deploy to custom domain env: CI: true + + - name: Upload error logs + if: ${{ failure() || cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.node }}-logs + path: | + ./vcpkg/buildtrees/**/*.log + ./build/**/*.log