diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml new file mode 100644 index 000000000..becf889a3 --- /dev/null +++ b/.github/workflows/preview.yml @@ -0,0 +1,39 @@ +name: Preview Deployment + +on: + workflow_dispatch: + pull_request: + branches: [main] + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: {} + +jobs: + preview: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - name: Cache Astro Output + uses: actions/cache@v4 + with: + path: content/node_modules/.astro + key: astro-cache-${{ hashFiles('content/src/content/**') }} + restore-keys: | + astro-cache- + + - name: Install dependences + uses: ./.github/actions/setup + with: + working-directory: ./content + + - name: Build + shell: bash + working-directory: ./content + run: pnpm build