diff --git a/.github/workflows/scraper.yml b/.github/workflows/scraper.yml index 151fa01..5c51bc2 100644 --- a/.github/workflows/scraper.yml +++ b/.github/workflows/scraper.yml @@ -121,19 +121,10 @@ jobs: git commit -m "$(date)" || exit 0 git push - deploy-static-site: - name: Deploy static site to Github Pages + prepare-site: + name: Prepare static site for Github Pages runs-on: ubuntu-latest needs: [generate-site] - permissions: - pages: write - id-token: write - concurrency: - group: "pages" - cancel-in-progress: true - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout static-generated branch uses: actions/checkout@v3 @@ -144,14 +135,38 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v3 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: | + - name: Archive github-pages artifact + run: | + tar \ + --dereference --hard-dereference \ + --directory . \ + -cvf "$RUNNER_TEMP/artifact.tar" + --exclude=.git \ + --exclude=.github \ + --exclude=LICENSE \ + --exclude=README.md \ . - !LICENSE - !README.md + - name: Upload github-pages artifact + uses: actions/upload-artifact@v3 + with: + name: github-pages + path: ${{ runner.temp }}/artifact.tar + + deploy-site: + name: Deploy static site to GitHub Pages + runs-on: ubuntu-latest + needs: [prepare-site] + permissions: + pages: write + id-token: write + concurrency: + group: "pages" + cancel-in-progress: true + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1