this repo has no description
at main 58 lines 1.7 kB view raw
1name: Build & deploy 2 3on: 4 push: 5 branches: [main] 6 7concurrency: 8 group: main 9 cancel-in-progress: true 10 11jobs: 12 check: 13 runs-on: ubuntu-latest 14 strategy: 15 matrix: 16 include: 17 - { lang: en, locale: en-US } 18 - { lang: fr, locale: fr-FR } 19 name: ${{ matrix.locale }} 20 environment: 21 name: ${{ matrix.lang }}.gwen.works 22 url: https://${{ matrix.lang }}.gwen.works 23 steps: 24 - name: Checkout code 25 uses: actions/checkout@v6 26 - name: Setup Bun 27 uses: oven-sh/setup-bun@v2 28 with: 29 bun-version-file: .bun-version 30 - name: Install dependencies 31 run: bun install --frozen-lockfile 32 33 - name: Build site 34 run: bun run build 35 env: 36 LANG: ${{ matrix.lang }} 37 LOCALE: ${{ matrix.locale }} 38 BUILD_COMMIT: ${{ github.sha }} 39 WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }} 40 41 - name: Deploy to Netlify 42 run: bunx netlify deploy 43 --prod 44 --no-build 45 --dir=dist 46 --site=${{ matrix.lang }}.gwen.works 47 --auth=${{ secrets.NETLIFY_TOKEN }} 48 --message="${{ github.ref_name }}@${{ github.sha }}" 49 50 - name: check if ${{ github.sha }} is deployed on ${{ matrix.lang }}.gwen.works 51 run: | 52 wget https://${{ matrix.lang }}.gwen.works/ 53 while ! grep "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" index.html; do 54 grep -o 'https://github.com/${{ github.repository }}/commit/[a-zA-Z0-9]*' index.html 55 sleep 5 56 rm index.html 57 wget https://${{ matrix.lang }}.gwen.works/ 58 done