+ +
b203256 silence wrangler commit-dirty warning
saifmukhtar · 2026-11-26
yaml · 56 lines · 1.4 KB
main
| 1 | name: Deploy git.openavx.xyz |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - main |
| 7 | tags: |
| 8 | - "v*" |
| 9 | workflow_dispatch: |
| 10 | |
| 11 | concurrency: |
| 12 | group: deploy-git-mirror |
| 13 | cancel-in-progress: true |
| 14 | |
| 15 | jobs: |
| 16 | deploy: |
| 17 | name: Build & Deploy Static Git Mirror |
| 18 | runs-on: ubuntu-latest |
| 19 | steps: |
| 20 | - name: Checkout openavx (full history) |
| 21 | uses: actions/checkout@v4 |
| 22 | with: |
| 23 | path: openavx |
| 24 | fetch-depth: 0 |
| 25 | |
| 26 | - name: Checkout openavx-site (private) |
| 27 | uses: actions/checkout@v4 |
| 28 | with: |
| 29 | repository: openavx-dev/openavx-site |
| 30 | token: ${{ secrets.SITE_REPO_TOKEN }} |
| 31 | path: openavx-site |
| 32 | |
| 33 | - name: Setup Node.js |
| 34 | uses: actions/setup-node@v4 |
| 35 | with: |
| 36 | node-version: "22" |
| 37 | cache: npm |
| 38 | cache-dependency-path: openavx-site/package-lock.json |
| 39 | |
| 40 | - name: Install dependencies |
| 41 | working-directory: openavx-site |
| 42 | run: npm ci |
| 43 | |
| 44 | - name: Build static git site & bare mirror |
| 45 | working-directory: openavx-site |
| 46 | env: |
| 47 | OPENAVX_REPO_PATH: ../openavx |
| 48 | run: npm run build:git |
| 49 | |
| 50 | - name: Deploy dist-git to Cloudflare Pages |
| 51 | uses: cloudflare/wrangler-action@v3 |
| 52 | with: |
| 53 | apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
| 54 | accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |
| 55 | workingDirectory: openavx-site |
| 56 | command: pages deploy dist-git --project-name=openavx-git --branch=main --commit-dirty=true |