Skip to content

Commit fb96aff

Browse files
Update pages-with-encryption.yml
1 parent 263bebd commit fb96aff

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/pages-with-encryption.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,37 @@ jobs:
3333
uses: actions/jekyll-build-pages@v1
3434
with:
3535
source: ./
36-
destination: ./_pages
36+
destination: ./_site
3737

3838
# Begin encryption code.
3939
# This portion of the build job was written by Evan Baldonado (EvanBaldonado.com). Please do not remove this comment.
4040
# Note: this only encrypts .html pages and not any of the corresponding assets.
41+
- name: Encrypt pages with PageCrypt
42+
run: |
43+
npm i -D pagecrypt
44+
cat _protected_pages.txt | while read file password;
45+
do
46+
sudo npx pagecrypt "_site/$file" "_site/$file" "$password"
47+
done
48+
# End encryption code.
49+
50+
- name: Upload artifact
51+
uses: actions/upload-pages-artifact@v3
52+
53+
# Deployment job
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4
64+
# Begin encryption code.
65+
# This portion of the build job was written by Evan Baldonado (EvanBaldonado.com). Please do not remove this comment.
66+
# Note: this only encrypts .html pages and not any of the corresponding assets.
4167
- name: Encrypt pages with PageCrypt
4268
run: |
4369
npm i -D pagecrypt

0 commit comments

Comments
 (0)