diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index ed67e29..9aa8dd7 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -20,7 +20,7 @@ on: - 'src/main/template/**' - 'src/main/resources/**' - '.asf.yaml.publish' - - 'pom.xml' + - '.htaccess' jobs: @@ -78,6 +78,8 @@ jobs: if: success() run: | cp -v .asf.yaml.publish target/site/.asf.yaml + cp -v .htaccess target/site/ + - name: Check Out Site Branch if: success() @@ -104,6 +106,7 @@ jobs: if: success() run: | mv -v target/site/.asf.yaml ./ + mv -v target/site/.htaccess ./ # Moves the new site resources from the build directory to the content directory @@ -111,7 +114,7 @@ jobs: if: success() run: | mkdir -v content - mv -v target/site/* ./ + mv -v target/site/* content/ # Explicitly removes build dir # This checks whether there are any remaining resources that were not moved to the correct location diff --git a/.github/workflows/recreate-site-branch.yml b/.github/workflows/recreate-site-branch.yml index d3913c4..a717289 100644 --- a/.github/workflows/recreate-site-branch.yml +++ b/.github/workflows/recreate-site-branch.yml @@ -76,7 +76,7 @@ jobs: git reset rm .gitignore git add target/site - git add .asf.yaml.publish + git add .asf.yaml.publish .htaccess git clean -df @@ -84,7 +84,8 @@ jobs: - name: Move Content and Site Configuration if: success() run: | - git mv -v target/site/* ./ + mkdir -v content + git mv -v target/site/* content/ git mv -v .asf.yaml.publish .asf.yaml diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..8f1d4fc --- /dev/null +++ b/.htaccess @@ -0,0 +1,3 @@ +RewriteEngine On +RewriteBase / +RewriteRule ^(?!content/)(.*)$ content/$1