Deploy build #1361
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: Deploy build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "main" ] | |
| schedule: | |
| - cron: "0 4 * * *" | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Generate Media | |
| run: | | |
| sudo apt update | |
| sudo apt install imagemagick webp -y | |
| ./convert-media.sh | |
| - name: Build | |
| run: | | |
| npm ci | |
| npm run build | |
| npm start | |
| - name: Resize Images | |
| run: | | |
| sudo ./resize-assets.sh | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload public directory | |
| path: './public' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |