Change Ubuntu version in build workflow #335
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: Build | |
| on: [push, pull_request] | |
| jobs: | |
| gatsby-build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'npm' | |
| - name: Removing locks | |
| run: rm package-lock.json | |
| - name: Install dependencies | |
| run: | | |
| sudo rm -f /etc/apt/apt-mirrors.txt | |
| echo "deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse" | sudo tee /etc/apt/sources.list | |
| sudo apt-get update | |
| sudo apt-get install aptitude | |
| sudo aptitude install -y libwebp-dev | |
| sudo apt-get install -y libvips-dev build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | |
| - name: Build Site | |
| run: | | |
| CXXFLAGS="--std=c++14" npm install | |
| npm run build | |
| - name: Upload public dir as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: public-dir | |
| path: public | |
| gen-og-images: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'npm' | |
| - name: Build files | |
| run: | | |
| cd scripts/genOGImages | |
| npm install | |
| npx playwright install --with-deps | |
| npm run build | |
| node gen-opengraph-images.js | |
| - name: Upload files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: og-images | |
| path: scripts/genOGImages/dist/members/ | |
| deploy-build: | |
| needs: [gen-og-images, gatsby-build] | |
| if: ${{ success() && github.ref == 'refs/heads/master' }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'npm' | |
| - name: get public dir | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: public-dir | |
| path: public | |
| - name: get og-images dir | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: og-images | |
| path: public/og/members/ | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Deploy Site | |
| env: | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| run: npx netlify-cli deploy --dir=public --prod | |