Skip to content

Commit 778a497

Browse files
committed
deploy: create tar archive for gh-pages manually
upload-pages-artifact excludes hidden files, so .well-known isnt being published. see actions/upload-pages-artifact#129 This PR drops that action to tar the _site dir ourselves and hands it off to upload-artifact for publishing. We probably don't even need to use that action if it ever has the config changed, but I'll open a PR to them with a include-hidden-files option
1 parent 2b03713 commit 778a497

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,31 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
23+
2324
- name: Setup Ruby
2425
uses: ruby/setup-ruby@8d27f39a5e7ad39aebbcbd1324f7af020229645c $ v1.287.0
2526
with:
26-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27-
cache-version: 0 # Increment this number if you need to re-download cached gems
27+
bundler-cache: true
28+
2829
- name: Setup Pages
2930
id: pages
3031
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
32+
3133
- name: Build with Jekyll
32-
# Outputs to the './_site' directory by default
3334
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
3435
env:
3536
JEKYLL_ENV: production
36-
- name: Upload gh-pages artifact
37-
uses: actions/upload-pages-artifact@v4
37+
38+
# doing this ourselves to get .well-known included
39+
# https://github.com/actions/upload-pages-artifact/issues/129
40+
- name: Create pages artifact
41+
run: tar -cf "$RUNNER_TEMP/github-pages.tar" -C _site .
42+
43+
- name: Upload pages artifact
44+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
3845
with:
39-
path: _site
40-
include-hidden-files: true # required for /.well-known/security.txt
46+
name: github-pages
47+
path: ${{ runner.temp }}/github-pages.tar
4148

4249
deploy:
4350
environment:

0 commit comments

Comments
 (0)