From ca1cc237a1fb7fd41a10d5d03cf31932734c66a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9lia?= Date: Mon, 18 Dec 2023 20:41:02 -0300 Subject: [PATCH] wip: archive pr preview (#323) Just working on some improvements to PR previews --- .github/workflows/preview.yml | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 27594eb47..402a8c5ff 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -6,17 +6,11 @@ on: - opened - reopened - synchronize - - closed - -permissions: - pull-requests: write jobs: pr-preview: runs-on: ubuntu-latest - if: github.event.pull_request.head.repo.full_name == github.repository - env: mailmap: ${{ secrets.MAILMAP }} @@ -56,23 +50,13 @@ jobs: NIX_BUILD_SHELL: bash build_command: | set -eu - 1lab-shake -j all --skip-agda -b "https://plt-amy.github.io/1lab-previews/pr-${{ github.event.number }}" + 1lab-shake -j all --skip-agda -b "https://preview.1lab.dev/${{ github.event.number }}/" eval "$installPhase" - cp -rv _build/site pr-${{ github.event.number }} - - - name: Upload 📦 - uses: dmnemec/copy_file_to_another_repo_action@main - env: - API_TOKEN_GITHUB: ${{ secrets.PREVIEW_TOKEN }} - with: - source_file: pr-${{ github.event.number }} - destination_repo: 'plt-amy/1lab-previews' - user_email: 'me@amelia.how' - user_name: 'plt-amy' - commit_message: 'Preview of PR #${{ github.event.number }}' + echo "${{ github.event.number }}" > _build/site/.pr-number + # cp -rv _build/site pr-${{ github.event.number }} - - name: Inform ℹ️ - uses: marocchino/sticky-pull-request-comment@v2 + - name: Archive 📦 + uses: actions/upload-artifact@v3 with: - message: | - [Rendered preview](https://plt-amy.github.io/1lab-previews/pr-${{ github.event.number }}) + name: pr-preview + path: _build/site