this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

♻️ Use workflow_call

+161 -61
+5
.editorconfig
··· 1 + root = true 2 + 3 + [.github/workflows/*.yml] 4 + indent_size = 2 5 + indent_style = space
+46
.github/workflows/_build.yml
··· 1 + name: Build 2 + 3 + on: 4 + workflow_call: 5 + inputs: 6 + artifact: 7 + type: string 8 + description: Name of the artifact to upload 9 + required: true 10 + lang: 11 + type: string 12 + description: Language code (e.g. "en" or "fr") 13 + required: true 14 + locale: 15 + type: string 16 + description: Locale code (e.g. "en-US" or "fr-FR") 17 + required: true 18 + build-commit: 19 + type: string 20 + description: Set BUILD_COMMIT 21 + required: false 22 + default: ${{ github.sha }} 23 + 24 + jobs: 25 + build: 26 + runs-on: ubuntu-latest 27 + steps: 28 + - name: Checkout code 29 + uses: actions/checkout@v5 30 + - name: Setup Bun 31 + uses: oven-sh/setup-bun@v2 32 + with: 33 + bun-version-file: .bun-version 34 + - name: Install dependencies 35 + run: bun install --frozen-lockfile 36 + - name: Build site 37 + run: bun run build 38 + env: 39 + LANG: ${{ inputs.lang }} 40 + LOCALE: ${{ inputs.locale }} 41 + BUILD_COMMIT: ${{ inputs.build-commit }} 42 + - name: Upload artifact 43 + uses: actions/upload-artifact@v4 44 + with: 45 + name: ${{ inputs.artifact }} 46 + path: dist
+50
.github/workflows/_deploy.yml
··· 1 + name: Deploy 2 + 3 + on: 4 + workflow_call: 5 + inputs: 6 + domain: 7 + type: string 8 + description: Domain to deploy to 9 + required: true 10 + netlify-project: 11 + type: string 12 + description: Name or ID of the Netlify project to deploy to 13 + required: true 14 + artifact: 15 + type: string 16 + description: Name of the artifact to download 17 + required: true 18 + 19 + jobs: 20 + deploy: 21 + runs-on: ubuntu-latest 22 + environment: 23 + name: ${{ inputs.domain }} 24 + url: https://${{ inputs.domain }}.gwen.works 25 + steps: 26 + - name: Download built site 27 + uses: actions/download-artifact@v5 28 + with: 29 + name: ${{ inputs.artifact }} 30 + - run: ls -la 31 + 32 + - name: Deploy to Netlify 33 + run: bunx netlify deploy 34 + --prod 35 + --no-build 36 + --dir=dist 37 + --site=${{ inputs.netlify-project }} 38 + --auth=${{ secrets.NETLIFY_TOKEN }} 39 + --message="${{ github.ref_name }}@${{ github.sha }}" 40 + --debug 41 + 42 + - name: check if ${{ github.sha }} is deployed on ${{ inputs.domain }} 43 + run: | 44 + wget https://${{ inputs.domain }}/ 45 + while ! grep "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" index.html; do 46 + grep -o 'https://github.com/${{ github.repository }}/commit/[a-zA-Z0-9]*' index.html 47 + sleep 5 48 + rm index.html 49 + wget https://${{ inputs.domain }}/ 50 + done
+34 -43
.github/workflows/deploy.yml
··· 1 - name: Deployed 1 + name: Build and Deploy 2 2 3 3 on: 4 4 push: ··· 9 9 cancel-in-progress: true 10 10 11 11 jobs: 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: Is commit live on ${{ matrix.lang }}.gwen.works? 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@v5 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 - - name: Build site 33 - run: bun run build 34 - env: 35 - LANG: ${{ matrix.lang }} 36 - LOCALE: ${{ matrix.locale }} 37 - BUILD_COMMIT: ${{ github.sha }} 38 - - name: Deploy to Netlify 39 - run: bunx netlify deploy 40 - --prod 41 - --no-build 42 - --dir=dist 43 - --site=${{ matrix.lang }}.gwen.works 44 - --auth=${{ secrets.NETLIFY_TOKEN }} 45 - - name: check if ${{ github.sha }} is deployed on ${{ matrix.lang }}.gwen.works 46 - run: | 47 - wget https://${{ matrix.lang }}.gwen.works/ 48 - while ! grep "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" index.html; do 49 - grep -o 'https://github.com/${{ github.repository }}/commit/[a-zA-Z0-9]*' index.html 50 - sleep 5 51 - rm index.html 52 - wget https://${{ matrix.lang }}.gwen.works/ 53 - done 12 + build-en: 13 + name: Build English site 14 + uses: ./.github/workflows/_build.yml 15 + with: 16 + artifact: dist-en 17 + lang: en 18 + locale: en-US 19 + 20 + deploy-en: 21 + name: Deploy English site 22 + needs: build-en 23 + uses: ./.github/workflows/_deploy.yml 24 + with: 25 + domain: en.gwen.works 26 + netlify-project: gwennlbh-portfolio-en 27 + artifact: dist-en 28 + 29 + build-fr: 30 + name: Build French site 31 + uses: ./.github/workflows/_build.yml 32 + with: 33 + artifact: dist-fr 34 + lang: fr 35 + locale: fr-FR 36 + 37 + deploy-fr: 38 + name: Deploy French site 39 + needs: build-fr 40 + uses: ./.github/workflows/_deploy.yml 41 + with: 42 + domain: fr.gwen.works 43 + netlify-project: gwennlbh-portfolio-fr 44 + artifact: dist-fr
+26 -18
.github/workflows/test.yml
··· 14 14 contents: write 15 15 16 16 jobs: 17 + prepare: 18 + name: Prepare 19 + uses: ./.github/workflows/_build.yml 20 + with: 21 + artifact: dist 22 + lang: fr 23 + locale: fr-FR 24 + build-commit: testing 25 + 17 26 update: 27 + name: Update screenshots 18 28 if: github.event_name == 'push' 19 - name: Update screenshots 29 + needs: [prepare] 20 30 runs-on: ubuntu-latest 21 31 container: 22 32 image: ghcr.io/gwennlbh/playwright-bun:v1.55.1 ··· 38 48 - name: Install dependencies 39 49 run: bun install --frozen-lockfile 40 50 41 - - name: Build site 42 - run: bun run build 43 - env: 44 - LANG: fr 45 - LOCALE: fr-FR 46 - BUILD_COMMIT: testing 51 + - name: Get built site 52 + uses: actions/download-artifact@v5 53 + with: 54 + name: dist 47 55 48 56 - name: Update screenshots 49 57 run: bunx playwright test --update-snapshots --update-source-method overwrite ··· 55 63 file_pattern: screenshots/ 56 64 57 65 test: 66 + name: Test 58 67 if: github.event_name == 'pull_request' 59 - name: Test 68 + needs: [prepare] 60 69 runs-on: ubuntu-latest 61 70 container: 62 71 image: ghcr.io/gwennlbh/playwright-bun:v1.55.1 63 72 environment: 64 73 name: Visual diffing for PR #${{ github.event.pull_request.number }} 65 - url: ${{ steps.deploy-to-gh-pages.outputs.page_url }} 74 + url: https://gwennlbh.github.io/portfolio/pr-${{ github.event.pull_request.number }}/ 66 75 steps: 67 76 - uses: actions/checkout@v5 68 77 ··· 75 84 with: 76 85 bun-version-file: .bun-version 77 86 78 - - name: Install dependencies 79 - run: bun install --frozen-lockfile 80 - 81 87 - name: Remove git pre-push hook 82 88 run: echo "" > .husky/pre-push 83 89 84 - - name: Build site 85 - run: bun run build 86 - env: 87 - LANG: fr 88 - LOCALE: fr-FR 89 - BUILD_COMMIT: testing 90 + - name: Install dependencies 91 + run: bun install --frozen-lockfile 92 + 93 + - name: Get built site 94 + uses: actions/download-artifact@v3 95 + with: 96 + name: dist 90 97 91 98 - name: Verify screenshots 92 99 run: bunx playwright test 93 100 94 101 - if: ${{ !cancelled() }} 102 + id: gh-pages 95 103 name: Upload report to github pages 96 104 uses: JamesIves/github-pages-deploy-action@v4 97 105 with: