Update github pages action to not serve LICENSE and README.md files

This commit is contained in:
3eef8a28f26fb2bcc514e6f1938929a1f931762 2023-02-10 18:10:28 -05:00
parent dc2d60a4c8
commit 7c28bf2d8f

View file

@ -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